I’m not 100% sure this will work, but you might be able to remove the stopped nodes from the voting configuration by using the Voting Exclusions API.
I’m not sure if this will work because you need the cluster up in order to send those commands. Maybe you can exclude nodes from voting before shutting them down.