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.
Probably not what you’re asking for, but I have an impression, that your primary motivation is curiosity and just good feeling of using the open platform, so I figured I’ll mention it.
I’m using ESP32-C3 boards with some sensors and ESPHome to monitor air quality in my house. The board is RISC-V based and can be bought for real cheap. (single digit $ price generally) ESPHome is quite easy to work with and (If you’re realistic with your expectations around very low power device) also quite powerful.
Honestly the ESPHome itself is almost too good if you’re really curious as it abstracts the differences between various boards quite well. You’re just editing a yaml file to define your desired functionality.
Even if you’re hesitant to do some soldering, you can get pretty far if you buy board and sensors with pre-soldered pins and some jumper wires.