iPhones are not waterproof, they're IP68 water resistant. Apple even describes the port as being a liquid egress (and thus ingress) point in their public "oops I dunked my phone in water" support documentation.
Dry your iPhone:
1. Tap your iPhone gently against your hand with the connector facing down to remove excess liquid. Leave your iPhone in a dry area with some airflow
https://support.apple.com/en-us/102643Taking care to remove liquid from the port just as well makes sense simply because you do not want to have water in there when you plug the phone in and water in ports just doesn’t dry as easily as water on some surface.
In practice iPhones are (like nearly all modern phones) extremely water resistent and very unlikely to be water damaged by exposure to water or even immersion in water.
Phones are quite durable. Exposure to water is always a risk, obviously (so is any handling of an untethered phone in the presence of hard surfaces) but I would argue it‘s one you can reasonably take.
For my personal risk tolerance I sometimes rinse my phone in running water (taking care not to directly point the running faucet at any of the openings of the phone), I generally don’t worry about spills (so the phone might be on the kitchen counter where spills are likely) and I also took it out into the sea to take some photos (but did not submerge it).
The latter period of the G5, were water cooled, IIRC. They suffered from problems due to corrosion, though.