There’s truth to that.
Exposure to bacteria at a young age trains the immune system.
Studies have shown that country kids have fewer allergies than city kids, that the youngest in a family has fewer than the oldest, and that dairy farm kids, who usually drink well water, raw milk, and play about the not so clean barnyard, have the fewest of all.
Methinks our increased soy intake is the reason for more peanut allergies, no one heard of peanut allergies 50 years ago, before soy was put into everything.