That does exist. Simple versions just have a large, deep drain with coils the cold water runs through. Fancier ones have a proper heat exchanger next to the shower (requires a pump) or in the basement. Water sanitation rules probably make it non trivial to get a design certified.