To be clear, my experience with our tank running out of hot water has been a very quick change from hot to freezing -- it seems to me that this would only help during the in-between time when the water is no longer hot, but not cold either. For me that is a very short time. But maybe I'm missing something (or maybe what I consider freezing is not objectively that cold -- just subjectively cold because I'm in the shower).
Plumbed correctly a drainwater heat exchanger helps
all the time during a shower, not just at the end, giving the tank an "apparent capacity" boost.
The heat exchanger should be plumbed to feed it's room-temperature or higher potable water to both the cold side of the shower AND the hot water heater. The shower's mixer then uses hot water out of the tank at a slower rate, since it's mixing the 125-130F or whatever hot water with 70-75F water rather than 35-45F water to come up with a ~105F shower head temp. Additionally, the water in the tank is being diluted with room temperature water rather than truly cold water, thus taking longer to drop to an unacceptable showering temperature.
Even when the tank's temp has dropped to the tepid 90sF at the output, the recovery time is much quicker than if the tank had been fed cold water rather than pre-heated water dropping to the 90s at the top, since the bottom of the tank is ~70F instead of ~40F.
A typical 2 gpm shower with a 70F rise (35F up to 105F) is a heat rate of ~70,000 BTU/hr, or ~20,000 watts. If half the heat is recovered from the drain (again, a 4" x 48" or 3" x 60" or taller) it's only pulling heat out of the water heater at 35,000 BTU/hr, or ~10,000 watts. A typical 40 gallon electric hot water heater delivers 4500 watts, so without the drainwater heat exchanger the shortfall is a whopping 15,500 watts, with no chance of keeping up and with a sharp rate of temperature decline. WITH the heat exchanger the shortfall is about 5500 watts- the average temp in the tank is dropping at only about 1/3 the rate.
The heat exchangers are tested at 2.5 gpm, and the efficiency at lower flows is a bit higher than specified. Most 2.5 gpm shower heads (the current max legal maximum for shower heads sold in theUS) aren't really flowing that fast, since that is tested at 80 psi water pressure. If you have lower house pressure (which you do) the flow is less. A low-flow showerhead might be rated at less than 2 gpm, and deliver less than 1.5 gpm in a house where the pressure is only 30-40 psi. Bucket-test the flow rate on your shower against a watch or stopwatch. The rate at which the tank is depleted can be gauged by your actual flow rates, and the return efficiency of a drainwater heat exchanger can be estimated at the lower-than-tested flow rate too.
A gravity film type heat exchanger that tested 50% @ 2.5 gpm will deliver about 57-58% efficiency at 1.5 gpm.