This project is using Home Assistant, but the ESPHome configuration is really simple, so perhaps you could adapt it to work without HA?
I'm sort of working on something similar but it's not complete at all. The idea is that my doorbell will post message to MQTT where I have automation in place to snap a picture and post message to Matrix that someone's at the door.
The esp32 devices have pretty limited HW, so you have to keep your expectations low if you don't want to outsource the automation to some external system. You could however definitely do simple things like HTTP post on button press. Which is enough to send a message via some chat or push notification to your phone.
I have some blog post WIP around this that is specifically trying to avoid Home Assistant because there are a ton of tutorials out there for HA already.