Makes a lot of sense. I’m glad I grew up with dogs - they surely exposed me to all sorts of things as a child that helped build my immune system. Single data point, but I’m allergy free, no asthma etc.
I grew up in a super "dirty" household. Shoes in the house, dog, no house cleaners, the whole family did our own gardening and lawn care, etc. No allergies. In fact allergies were practically unheard of in that place and time.
Yeah I don't think allergies depend on external factors that much. My mother and I have pretty equivalent childhoods even down to same locations and she's wrecked with allergies and I have none, yet my health is worse overall (despite me having a healthier lifestyle).
While I believe some exposure helps build resistance ultimately your overall health will be influenced by stuff beyond your control AND your lifestyle/activities combined.
Dose creates a poison - Paracelsus (translated from Polish). I mean if someone is allergic on dogs it will probably not heal them from allergy. However I myself had allergy on dog's and cat's fur, but for some reason my parents bought me a dog, and I guess it was not the hardest allergy, because I grew up with it and now I have no allergies on dog's fur...