You don’t need HA for that setup, you can command Shelly directly from Esphome.
My bad. Presumably there is already power to the pump, so having the Shelly 1 which controls the pump constantly connected to wi-fi shouldn’t be a problem. It is at the tank end that you have to watch power consumption.
My greenhouse is doing more, and not especially optimised for power consumption - eg modules with power LEDs which don’t add anything to the functionality but consume small amounts of power. I expect you will get better mileage than I currently do. My point was to not just assume that a battery will last a long time.
And Karosm is right, you can do all the logic in ESPHome on your tank microcontroller.
If you wanted to add Home Assistant, it would basically just be logging what the ESP is doing … which is not a bad thing, except for using more battery to regularly connect to HA to report the temperature and water level values.