@ sparkfun.com has a tutorial on how to build smart and connected water sensor using ESP32. He writes:
For this project, you can use either the ESP8266 Thing, or the ESP32 Thing. One of the many improvements made on the ESP32 is the capacitive touch circuitry built in to ten of the IO pins (we can see the pins capable of capacitive touch in the datasheet below). It should be noted though, that Touch1 cannot be used as capacitive touch sensor because of the pull-up resistor connected to GPIO pin 0. With the capacitive touch, we’ll be able to sense water with just two pins; the first will be connected directly to a capacitive touch pin, and the second will be connected to ground.
Creating a Smart Water Sensor with the ESP32 Thing – [Link]