Given that the tear-causing effect of onions is due to a straight forward chemical process, it seems highly unlikely that you would develop any kind of actual immunity in terms of the effect. Scientific American describes it:
Peeling, cutting or crushing an onion's tissue releases enzymes called
allinases, which convert these molecules to sulfenic acids. The
sulfenic acids, in turn, spontaneously rearrange to form
syn-propanethial-S-oxide, the chemical that triggers the tears. They
also condense to form odorous thiosulfinates, coincidentally evoking
the pungent odor associated with chopping onions and eliciting the
false accusation that it is the odor that causes the weepy eye.
Incidentally, sulfenic acid in garlic takes a different chemical
route, sparing the eyes. The formation of syn-propanethial-S-oxide
peaks at about 30 seconds after mechanical damage to the onion and
completes its cycle of chemical evolution over about five minutes.
[ ... ] Free nerve endings [on the cornea] detect
syn-propanethial-S-oxide on the cornea and drive activity in the
ciliary nerve--which the central nervous system interprets as a
burning sensation--in proportion to the compound's concentration. This
nerve activity reflexively activates the autonomic fibers, which then
carry a signal back to the eye ordering the lachrymal glands to wash
the irritant away.
It turns out that newer science indicates the conversion is not spontaneous, but due to an enzyme for this purpose, now named lachrymatory-factor synthase.
What is likely, especially for an experienced cook are:
- Improved knife skills and speed, lowering the amount of time in close contact with the irritating gasses produced by chopping onions
- Increased tolerance for the specific sensation