Are there some genetic reasons I get anaphylaxis off and on?

Poss food allergy. The symptoms of anaphylaxis can begin as swelling of the head and neck area, tightness in the throat or chest, rash or flushing, or hoarseness (among others) and are very serious! if they recur then you may have an undiagnosed food allergy or an allergy to a certain chemical or medication. You must be aware of your surroundings, your symptoms and what your eat. See an allergist asap!
See MD. Anaphylaxis is a complex medical disease, that has a variety of causes and may have a familial predilection, and can be life threatening. If one suspects they have anaphylaxis then a thorough work - up by an allergist is needed.