The aim of wastewater treatment is to remove as much of the suspended solids as possible before the effluent is discharged back to the environment. That the pollutant concentrations in the treated wastewater comply with the regulations regarding disposal of wastewaters into sewers or into rivers.
We has a lot of sewage treatment processes to choose from and there are mature cases to draw on.