I mean, avoidance is more effective than vaccination in preventing you from getting the flu, but that’s not the point of getting vaccinated.
I wouldn’t tell you to not trust the advice of your doctor. But I would tell you that there is an always argument both ways for something like this. A different doctor may feel differently, and sometimes doctors change their minds when given a bit of pushback. It might be worth asking about the possibility of oral immunotherapy in addition to avoidance, rather than as a substitute for it.