It is a challenging problem to solve, as any error condition might leave you unable to connect at all. At least as I think through it, you are asking for a command that kills your current connection and then (hopefully) reconnects the router. As soon as you kill your current connection, most everything associated with your login session disappears. So while, for example, you could kill the OpenVPN client while connected over OpenVPN, you wouldn’t be able to then start WireGuard as you’re no longer connected. You’d have to trust that whatever was running in the background properly switched over, its operation not visible you.
SSH is perhaps the easiest, robust approach. SSH clients are available for Windows, macOS, `nix, iOS, Android, and others, generally without charge.