Sand based water filters have been used for over 100 years to treat waste water. They are generally used on a larger scale to treat a water supply for a whole community, and will be custom made. Most units require a constant flow of water to work correctly, and so wouldn't be suitable for well water treatment.