If you don’t want to risk getting a ban at all, the only safe thing is to not connect to the internet at all. Maybe there is some level of safety, but it could take only one mistake.
If we assume that we fully understand how nintendo catches this, we would still only ubderstand at that point in time. They could still change or push updates which could cause you a problem.
What I’m thinking. If it took that long for my server to shut down, I would just sync and force reset. Although tbh, most things are VMs now, and those reboot pretty fast and would likely not be affected much by these improvements.