Even more effective: drain water heat recovery, preheating the incoming water with the outgoing waste heat.
Quick overview from one manufacturer here: https://renewability.com
Quick overview from one manufacturer here: https://renewability.com
Perhaps only if you fill a large tub or a pool every day.
https://www.energy.gov/energysaver/drain-water-heat-recovery