Here's a classic for you, one of the early incidents which lead to this kind of regulation: https://en.wikipedia.org/wiki/1858_Bradford_sweets_poisoning
Here's some more contemporary links:
https://food.ec.europa.eu/safety/food-improvement-agents/add...
https://food.ec.europa.eu/safety/food-improvement-agents/fla...
Which includes an answer to your question: "The procedure for authorisation of a flavouring substance is common to the one established for food additives and enzymes under Regulation (EC) No 1331/2008."