It sounds like maybe they portray the guy's reaction/suffering way too realistically, but I don't see any problem with this, in concept.
Just sounds like cartoon violence, to me. Looney Toons did way worse, like, every other episode.
Maybe instead of getting shocked that a movie about fictional anthropomorphic creatures that obviously don't have completely human concepts of morality or mortality showed a food allergy as a "weapon" we should just, y'know, teach kids that movies are movies and hurting people is 99% of the time wrong, regardless of method?
This scene doesn't "trivialize" food allergies, though. I mean, a large thrust of the complaint is that they really realistically show the guy reacting to it, right?