If you see a liquid-detection alert on your iPhone, click here --> https://support.apple.com/HT210424 - "When you connect a Lightning cable or an accessory to your iPhone XS, iPhone XS Max, iPhone XR, or later, your iPhone can warn you if there's liquid in the Lightning port."
To me it sounds like it only does it if there's liquid in the lightning port. Other liquid contact is determined by visual means.
Water and other liquid damage to iPhone or iPod isn't covered by warranty - http://support.apple.com/HT204104 - "iPhone and most iPod devices are equipped with Liquid Contact Indicators (LCIs) that you can see from the outside."