It's very possible that early exposure is beneficial. It makes sense to me. However, that does not explain why peanut allergies are so much higher now than a century ago. The under-diagnosis hypothesis does not make sense either, since the reactions are so severe.
Something is leading to exploding allergies. I can list other hypotheses, at least as strong, including:
- Travel and genetics (we co-evolve to local environments; the US is mostly immigrant)
- Parasites / hygiene hypothesis
- Environmental changes / new industrial-age pollutants
And, of course, there are things we don't know about and combination effects.
Footnote: Peanuts are native to South America. When the Spanish came, or they were introduced to Europe, we didn't see mass anaphylaxis either, at least as far as I know.