I know a guy who installed a drain-water heat-exchanger; from the temperature deltas and flow rates he said he was seeing, I figured he was getting an effective 7kw from it using the warm drain water to preheat the replacement water flowing into the water heater.
I’ve worked that idea in head many mornings standing in the shower watching the warm water go down the drain. My idea centers around a manifold to smaller drain pipes in parallel to increase the surface area. But I keep getting hung up on what a god-awful clog it would create in time. Next thought was to come up with a finned drain pipe similar to old school baseboard hot water heat. Then again if I switch to cold showers I won’t be thinking about it.