It's not only the filament, but the extruder.
The CDC has some good info on 3D printers, but they don't mention food safety: https://www.cdc.gov/niosh/publications/numbered/2024-103.htm...
Here is an article on the food side of things: https://spoolhound.com/food-safety-guide