Upgrade an old Intercom to Open the door

That should work.
Make sure you flash the ESP with the correct firmware to be able to connect it to openHAB: either with Tasmota or with ESPEasy. Connection to openHAB is done through MQTT.