had a similar issue with a serial input node "hanging" every some hours. I have used a watchdog timer to redeploy the flow after some time of inactivity (node-red-contrib-watchdog). You need a function node and a http-request:
[{"id":"3b54a219.b12d4e","type":"inject","z":"1c0f9a92.981245","name":"","topic":"","payload":"","payloadType":"str","repeat":"","crontab":"","once":false,"x":145,"y":106,"wires":[["85a767e0.79acf8"]]},{"id":"85a767e0.79acf8","type":"function","z":"1c0f9a92.981245","name":"Reload MSG","func":"msg.headers = {\n \"Node-RED-Deployment-Type\":\"reload\"\n}\nreturn msg;","outputs":1,"noerr":0,"x":305,"y":106,"wires":[["2c0ba43f.97d61c"]]},{"id":"2c0ba43f.97d61c","type":"http request","z":"1c0f9a92.981245","name":"http: Localhost","method":"POST","ret":"txt","url":"
http://localhost:1880/flows","tls":"","x":483,"y":106,"wires":[["4e147d27.754094"]]},{"id":"4e147d27.754094","type":"debug","z":"1c0f9a92.981245","name":"","active":true,"console":"false","complete":"payload","x":658,"y":106,"wires":[]}]