Considering the docker node leave the swarm unexpectedly, it will be good to do pro active monitoring if swarm health using automation . automation can include monitoring and alerting of swarm nodes and corrective action if required
Need some help to setup