The thermodynamic component of the tank, i.e. the heat exchange, does not generate any pollution and is totally clean. Indeed, the calories recovered from the air or water are inexhaustible.
Finally, the only environmental impact is the electricity used to run the heat pump compressor.
The thermodynamic DHW tank is a much more ecological system than water heaters running on gas, oil or electricity.