I agree with the last point, so I usually end up delegating any sort of logic handling to my automations. ESPHome will just report the state of sensors, my code figures out what to do with them.
I _really_ like that you can do light automations easily with ESPHome as well. For my cat feeder, it has some cron-like scheduling to go off ever so often and I do not want my cats to starve if my Home Assistant VM is down.
That's understandable although of course doing things in YAML in ESPHome has the advantage that it will continue to work if HA is unavailable for some reason.
I prefer the same but still for important uses I'll write native code to serve as a back up - e.g sprinkler auto shut off after x minutes