The Constitution does not specify any definite procedure.
If the State legislature insists that only Democrats will be appointed, and enacts such a policy into law, then that is the end of it.
That appears to be the effective result in Pennsylvania, Wisconsin, Michigan, Arizona, and Georgia. The "Pretense-of-Law" allows unlimited election fraud by the Democrats to insure their candidate wins.
I can see a few problems with the legitimacy of such a Government. These cannot be addressed by clever legal arguments or more "elections".
Can’t happen. The constitution guarantees REPUBLICAN, not DEMOCRAT.
“The United States shall guarantee to every State in this Union a Republican Form of Government ...”
But a guarantee from the US government is worthless.