We have a water cooler at the office, which needs regular refilling. The tank is covered by a jacket, so you can’t see how empty it is.
I envisage some sort of float that would be bluetooth connected and could tell ha the warer level. I don’t think anything based on a ultrasonic sensor would work.
I once bought Camelbak’s water meter. It’s a basic displacement meter with an attachable digital display. It needs to be reset upon refill. I can imagine there’s a pipe in the watercooler you could cut to insert it and then use an ESP to pick up the pulses. Maybe even the built-in hall sensor would work.
I don’t know if they still make them though, but there are probably tons of such displacement meters on e.g. AliExpress.
I know some people put pressure sensors at the bottom of boat water or fuel tanks to sense the level of liquid. I haven’t done it so I can’t offer much more detail, but maybe it’s something to look into.