Electroactive bacteria, found in mud and wastewater everywhere, can clean wastewater and produce electricity at the same time. They eat organics from the water, and transfer their terminal metabolic electrons to electrodes embedded in the anaerobic environment. The result: wastewater treatment without aeration, and with about 80% less sludge production, with power as byproduct.
Another option is to power production using a plant-microbial fuel cell.
I’d love to form a team to consider the options and try to build a prototype. The necessary materials are pretty cheap and basic, and the result is to be an open source wastewater treatment solution or a plant-pot that produces a little electricity. (links are just examples, of course)