The solution is for people to expose their kids to that stuff at home. That way the kids get the exposure without endangering the population.
I have no evidence for any of it, but my pet theory is that the increase in food allergies (especially adult onset) is at least somewhat environmental. That we're exposed to so many toxic products/pollutants, and our bodies so filled with microplastics, that our gut epithelium becomes compromised, we have increased inflammation, and our immune systems are increasingly on high alert causing them to overreact to things that aren't really threats.