Running Openhab on two machines simultaneously

Why don’t you run openhab in docker and use a docker swarm? That way it’ll automatically switch if there is a failure and you can use the swarm to run other software as well (e.g. HABApp, Graphana, etc.).

Also as the other prople suggested, get some simple hardware which provides a network interface for your wiring. Then control the simple hardware from openhab.