Honestly, having gone down that route before, developing a no touch system and having a system that stays up to date with patches and upgrades is impossible. So I’ve found the effort involved in creating a even a partially no-touch system far outweighs the labor savings.
Typically if you want to build a fault tolerant system like this, which is really what you are after, you need something outside the thing being monitored to detect and reset the thing when a problem is detected. Often this is called a watch dog system. I strongly recommend that this monitor be implemented outside of OH itself. The problem is typically if the thing you are monitoring experiences a fault, you can’t trust that thing to operate correctly. If you can’t trust it to operate correctly you cannot trust the watch dog itself to work correctly.
So it sounds like you are using socat/ser2net to access your zwave controller and periodically that goes offline. So the watchdog in this case is watching the zwave serial Thing and when it goes offline it needs to restart just OH? The whole machine? Is there any way you can see if there is a problem with socat/ser2net without polling OH directly, perhaps checking the logs?
Let’s say the whole machine. But what if the device is legitimately OFFLINE? You don’t want your watchdog to put your computer into a reboot loop. So you need to add logic to only reboot once and if that doesn’t work don’t reboot again until it comes back online.
Depending on what the source is to tell you that you have a problem (system logs, polling the Thing status through OH’s REST API, etc) you could probably handle this with a cron job and a shell script. Systemd has a watch dog service built in as well which you can use for this, but I’ve found the tutorials for it to be a bit more difficult to understand.