I’d test the water to find out what’s in it, most filters don’t remove heavy metals. The quality of the water depends on the quality of the air. Stuff in the air lands on the cooling coils and the condensation pulls it off.
It’s a cool idea though! Just be sure you know what you have when you use it.