My brother was deadly allergic to even trace quantities of peanut products as a child. Nonetheless, we routinely ate peanut butter sandwiches and peanuts at home, never mind school or the many other spaces a child occupies, and it was never an issue. Reasonable precautions were sufficient to eliminate all practical concern and it didn’t require sterilizing the environment of all peanuts. This was easy and effective, same as with other kids with dangerous allergies. The only incident I can remember involved some Korean food that used peanut oil, and he knew it contained peanut the instant he put it in his mouth. He was quite capable of avoiding peanut products on his own.
Banning everyone from eating peanut products anywhere in the vicinity of someone with a peanut allergy is just another example of pathological safety-ism. And it goes far beyond actual deadly allergies now, we accommodate all manner of imagined hyper-sensitivities “just in case” with no rational or pragmatic consideration of the risks and costs.