Hm. What about hydroponics? Lower risk of fungal infections there.
At the end of the day it's a pit of water with nutrient that is usually somewhat warm. You can control algae with hydrogen peroxide but there is always some water that will stagnate somewhere and lead to some mold level. It's really best to grow plants with a clear growth => harvest cycle so that you can periodically re-sanitize everything.