@gleem, your description is a lot like particular technologies used in maintaining aquariums.
In particular, tuff scrubbers in salt water aquarium systems.
Mostly, the problem in closed/partially closed water systems for fish is a build up of nitrogenous compounds in the water.
Normally, bacterial filters are used to move the nitrogen to less toxic compounds (nitrate vs. ammonia), but even those compounds can build up to troublesome levels. Bacterial filters just grow bacteria (plus other in filter organisms) while processing the nitrogen compounds for energy.
An alternative, I am mostly aware of from salt water aquarium systems, is an algal turf scrubber type of filter.
Water containing fish wastes, flows over an illuminated bed (lights if inside) where turf scrubbing algae are anchored.
The algae grows fast and accumulates mass (made as the result of photosynthesis) out of materials it gets and removes from the water. The mass is largely composed of the elements: C, N, P, O, H, S.
The filters are designed so that it is easy to remove the accumulated mass, thus taking those chemicals out of the water system.
In water systems it is easy to measure amounts of dissolved chemicals in the water, as well as how fast things in the water system are growing.
There is a lot done with it.
https://enst.umd.edu/research/research-centers/what-algal-turf-scrubber: (ATS + Algal Turf Scrubber)
The ATS system consists of an attached algal community growing on screens in a shallow trough or raceway through which water is pumped. The algal community provides water treatment by uptake of inorganic compounds in photosynthesis. Water is pumped from a waterway onto the raceway and algae remove the nutrients through biological uptake for growth as the water flows down the raceway. At the end of the raceway water is released back into the waterway, with a lower nutrient concentration than when it was pumped up onto the top of the raceway. The nutrients that have been removed from the waterway are stored in the biomass of the algae growing on the screen. The algae are harvested, approximately once per week, during the growing season thus removing nutrients from the waterway in their biomass. Because of the fast growth rate of algae on the ATS, this technology can remove nutrients at a high rate. Harvesting is important since this action rejuvenates the community and leads to high growth rates. In fact, biomass production rates of ATS are among the highest of any recorded values for natural or managed ecosystems.