Yeah, having a system that knows the door's state would be ideal, but TBH we have cameras that can see the state already, so just checking that before hitting the button would do the trick for me. I recall seeing a smart device that can be used to push buttons on coffee makers or garage doors, or other devices that require physical button presses.
Yes, there are several cheap Home Assistant-compatible devices to do dry contact closure and/or a 5v pulse. The Shelly 1 is a popular turn key Wifi-based option but there are wired and Zigbee options as well.
Many come with (or can be OTA flashed with) Tasmota or ESP Home open source firmware, ensuring you'll continue to control them forever locally and/or via your cloud API of choice - which I highly recommend doing. I built a new house with 75 ESP 8266-based in-wall WiFi dimmer switches ($19 ea) plus dozens of other wall plugs, power strips, sensors, etc - all running Tasmota. It's great because each Tasmota device powers up and works as expected as a 'dumb' device. The dimmers always dim and the wall plugs/power strips have physical on/off buttons that always work.
But they'll also connect with each other via Wifi in ad-hoc device groups (if I enable that option) and will follow whatever rules I set in their on-device config - like "you are Device #3 in Group #2 and you follow-the-leader of Device #5". And they do this even if there's no Wifi router active. If there IS a Wifi router available, then they'll log on to the local-only subnet I've limited them to and work under local and/or cloud Home Assistant control with infinite automation possibilities. So it's an open, flexible, secure system that can be maximally "Smart" but has layered fallbacks which guarantee as long as there's 110v power - the lights, plugs and other devices always fucking work.
IMHO, open source with layered dumb --> local --> any-cloud-API-you-like is the only sane home automation architecture. There's no way I'm ever permanently installing some for-profit company's opaque, remotely updatable system into my home's walls. Even if they don't turn evil like Chamberlain did, it would be crazy to leave the basic functionality of my house's lights, door locks, HVAC, sensors, etc at the mercy of some vendor bug, broadband outage or regional S3 'mis-configuration'.