ESPhome is optimized for use with Home Assistant but it can be used with any other smart home software or someting like node red (normally using MQTT). But it can also be used without MQTT or Home Assistant API at all. You still could use WiFi for OTA updates or control over http.
I have a senseair S8 connected to an ESP32 that shows it’s values on a display (and also reports it to my home assistant) but that you don’t care about ) so yes it can work standalone.