The proper way of doing this is to have two separate systems in a cluster such as proxmox. The system with GPUs runs certain workloads and the non GPU system runs other workloads.
Each system can be connected (or not) to a ups and shut down with a power outage and then boot back up when power is back.
Don't try hot-plugging a gpu, it will never be reliable.
Run a proxmox cluster or kubernetes cluster, it is designed for this type of application but will add a fair amount of complexity.