It can be, but is a hassle. There are food safe filaments, there are filaments that "should be" safe, like unmodified PETG, but the issue is to make all parts that are in contact with the filament food safe; extruder gears, Bowden tubes and other guides, hot ends, etc...
I imagine that it would be a hassle for parts suppliers to certify the bajillion variations of these parts as food safe.