yeah, the fruit flies are a problem mostly during fermentation itself. They like to hang out around the air locks where theCO2 and the odors escape. I use flypaper to control them but I think if you could prevent them from smelling the odors escaping from the airlocks, they wouldn’t become a problem. a fume hood of some sort perhaps?
I never use air locks or bubblers.
I use saran wrap. Take a piece about 9 in X 9 in and cover over the top of the carboy. Snap some rubber bands around it to hold it in place.
If it gets to really fermenting good, just take a sewing needle and poke a very tiny hole in it.
It’s always worked good for me and is just easier than messing with more stuff I would have to disinfect before brewing.