This is an ESPHome configuration for an ESP32 that monitors a sump pump pit, using the ESP32 capacitive touch sensors, with a level being reported to Home Assistant.
The ESP32 is mounted on a piece of PVC pipe, with wires extending down to different lengths. I used a length of old ethernet cable I had sitting around.
There's also a wire at the bottom connected to the ground pin, and this gives more reliable touch sensor values. The USB32 is powered from USB.