There is nothing you can do if you remain on the EWR flights. You best bet is to pack your own food.
Even ifyou switch to ex-JFK transcon flights I would be suspect of airline catering if I had a food allergy.
Given your need for gluten free food, and your past experiences, I would not trust AA or an other airline to correctly cater the proper food even if you ordered it in advance.