Obviously I have enough common sense to not add pour water into boiling oil, but after the cooking is done I try to add water to the pan so it's easier to wash. Usually I let it sit there cooling off and more often than not I just forget about it and have the biohazard that is a greasy cast iron ribbed pan to deal with in the morning. If the pan is still somewhat hot and you feel it's warm feel 3-4 inches above the surface of the cookware is it fine to add water? Can it damage the pan in the long run?
Depends on the pan and how hot the pan is ; glass pan is likely a problem, and some of the glass-like decorative coatings on metal pans are a risk. Otherwise temperatures would need to be well above cooking temperatures to even consider damage to a metal pan. Hot enough that the water will "bounce" out of the pan because of rapid steam development. Aluminum could be a problem at 800 F ( Melting begins around 1000 F ). Magnetic stainless ( 13 % Cr) is happy as auto exhaust to 1400 F ( red). Non-magnetic stainless ( 18-8 ) will go higher. Cast-iron and copper can go 1300 F + ( dim red) : however the tin coating on older copper will be destroyed above 600 F... BUT , some pans will warp even at normal cooking temps; I have had a couple inexpensive aluminum frying pans develop a rounded bottom so they won't sit flat on the stove (no water cooling involved)