That’s why you you bind mount all the important data and back it up with a proper backup solution like borg. And why you also have a monitoring and notification system that alerts you if a service goes down. I will get a telegram message within 15 minutes of a service going down.
I use healthchecks for all my scripts and making sure my docker containers and services are up. If anything goes down or errors then I get sent a telegram message immediately.