And then there is the supply chain since most restaurants are not cooking every single part of every meal from absolute scratch ingredients.
There was a story about a woman near us operating some sort of celiac friendly/gluten free bakery. One day the donuts were delivered and she noticed some D shaped sprinkles and realized her supplier had come up short and just put some random Dunkin Donuts into the delivery. Good on her catching it, but how in good conscience could she operate a bakery advertising itself as celiac friendly/gluten free if she was outsourcing like this?
If I had any sort of food allergy that could result in hospitalization or death, I'd just stop eating out. I'd rather be a little boring than very dead.
You go to a place advertising itself as gluten free / vegan / celiac safe / whatever .. and its been outsourced.
Once it's outsourced, all bets are off. Who knows if the vendor subbed it out further, etc.
Which is why for a certain level of food sensitivity it's almost not worth eating out. It comes down to - do you trust random strangers with your life?