I wash my Xs regularly under warm tap water, including the frontal speaker grill which can get get dusty and dirty.
I’m doing this for 6 months now and the phone is perfectly fine.
Make sure to not keep it under water for more than 10 second per side (generally, you should keep it short). Immediately wrap your phone with some thick toilet paper. After drying the phone, I use pressurized air to remove excess water from the speaker grills and run a 1Hz-20.000Hz video at max volume to spit out the remaining water! DONE!
Disclaimer: I have tried this for over a year with the iPhone X and Xs. I do not know if it will damage other types of iPhones. Also, my phones are always caseless, but there are no damages, dents or holes on the phone.