The entire concept of running waste water through a heat exchanger with fresh, potable water. Should a problem with the heat exchanger come up, bacteria from the waste water could be introduced into the fresh water lines, and if there is no backflow preventer installed on the premises (Usually backflow devices are only put on commercial buildings, not residential) the bacteria can find its way into the water main and contaminate the water supply for the whole town.
ahhh the fresh water is under pressure and the drain line is not - how is that going to happen? The water pipes are burried in the street with sewer pipes - do they leak? Yeah once in a while because they are burried. Yeah RI has a thing about it my brother checked into it - Vermont doesn't have a problem with it and all you need to do is solder the copper cold water feed to a copper drain pipe and that is it.
I wasn't envisioning that kind of heat exchanger at all. What about just something like radiator fins attached to a normal waste pipe, going to a normal cold water supply pipe? How about a system that uses an intermediate liquid medium to move some heat? Or, something like a repurposed geothermal heat pump?
Just some thoughts, not saying any of these things would actually work.
Actually I saw an electric hot water heater that uses $130-150 a year in electricity at Lowes that using a heat pump and takes the heat of the the air in the basement. Only problem was they wanted $1599.99 for it. Now if you connected the cold coils to the basement freezer you get hot water and a freezer for the same low price. The only problem would be the temperature differential but I think that will still work ok. No real need for fins since the drain water is warmer than the air - you could also wrap some conductive metal around both pipes like annealed aluminum sheet metal and clamp it tight with some heat sink compound to prevent oxidation.
This won't work for shower use, but one thing we do if only a small amount of hot water is needed to keep from running excess cold water from the lines and running up the gallons on our water bill is to run a pot of water through the coffee maker to heat it up. We also done this at out old home where we had our own well. Just one pot of hot water added to the cold water makes the water hot enough for washing dishes and doesn't waste water and energy from running the pipes full of hot water that's not going to be used and will only get cold sitting there. Also the water heater is going to have to heat the incoming cold water going into the water heater so the coffee maker probably only uses 100 watts or so and only stays on for 2-3 minutes where most water heaters are 3500+ watts and having to restore heat to 40 gallons or more.