The "nasties" in developer are (1) high pH, and (2) reduction potential. Exactly the thing that make it work as a developer. Neither will be affected by a sand filter. The pH can be neutralised by adding acid (as in stop bath), and the reduction potential can be reduced by oxidation. On the other hand the oxidation products of developers can be just as nasty as the original chemicals! The best way to dispose of developer is to allow it to evaporate to a thick sludge, and hand that in at a hazardous waste site. The second best way is to dilute it a lot and pour it down the drain...
The alkalinity of most standard film and print developers is not high enough to easily damage the sewer pipes (acid can be more dangerous in this regard). The danger is when undiluted developer stays in the pipe and traps for a prolonged period of time. If developer is dumped first, followed by other chemicals and then some water, traps and peripheral pipes may be flushed effectively.
Oxygen demand is best dealt with (1) use only necessary amount of developer, and to exhaustion, (2) leave exhausted developer in open tray for a few days or partially filled, uncapped tanks for several days. In order to effectively reduce COD, the developer has to be nearly completely oxidized. That is, VERY dark color, not just brown.
In my view, in small scale darkrooms in areas where sewer system is well developed, it is best to focus on the (1) part. If you cut down the amount of developer waste by 20%, that's 20% saving of your oxygen demand. To do the same in the (2) approach, it'll take a lot of time.
Oxidation products of ascorbic acid are not nasty. Some of the products may smell, but not as badly as oxidized/exhausted HQ developers. This is another reason to use ascorbate-based developers. (Note: I'm not necessarily promoting my products here. I'm perfectly happy to hear individual photographers mixing DS-10, DS-14, neutral fix, etc. and save money. But on the other hand since late May Silvergrain products are being used by institional users such as pro labs, art schools, some government agencies and others, who had no way to mix chemicals from bulk raw agents. I think those users now use considerably less hydroquinone-based products.)