Settling ponds were constructed to remove the trash and solids. Cities on major rivers in the USA used this process until the late 1960's. The septic tank is a modification of primary sedimentation. The tank in enclosed to prevent hazard and contain odors. The tank is large enough to contain several years of trash etc.
Lagoons are an improvement on primary sedimentation.
Natural bacteria and algae grow using the available oxygen fertilizer and sunlight. In a lagoon the pathogens die of old age, are consumed by other bacteria, and are killed by the prolonged exposure to sunlight. The downside of a lagoon system is the large area required, the hazard of drowning, and the amount of algae present in the discharge. The algae can be pollution to a very clean creek or lake. Air bubbled in the first cell of a properly designed lagoon system will reduce the holding time form 120 days to 45 days or less.