Earlier this year (2020) the Supreme Court determined that the States can require electors for president and vice president (their “members” of the Electoral College) to vote for the candidates chosen by vote of the people. In other words, when the electoral voters (the silliest sounding term I’ve made up) cast their votes at the State Capitols, if any are not what the most people voted for, those votes are void from the beginning and the “faithless” offender can be then pitched out and replaced for wasting everyone’s time.
At this point, I would think a State could do it “by operation of law”: when the final vote count for president and vice president is issued, the votes sent to Congress are determined automatically and sworn out on the day the Electoral College meets. (The Constitution requires this happen on the same day throughout the country, so they can’t be issued early.)
That process may get held up at the Supreme Court, so I suggest a neater way of doing this: random draw of the voters of the State after the vote totals are known. If a State has N votes in the Electoral College, then the unified electoral roll of the entire State would be used as if it were drawing for jurors. N registered voters would be selected by random process and a County or State official sent out to meet them and request they come to the State Capitol on that day. Since this is after the results are known, if someone had a conscience against voting for either winning candidate, they could decline. (They would not have to say why.)
The law would provide their regular pay or instruction (if a student) or life would be totally unaffected by this, and no one could retaliate against them for performing their duty. Probably this means the District Attorney (or equivalent) would be the best one to meet them and tell them all of this. Also, if they did have to report retaliation or such, the DA would know them and be unable to not remember them. Any possibly removable problem would be honestly addressed by assistance, appeals to the duty (if the problem was some other person), or punishment in court for interference with the election (if someone like their boss tried to be nasty about it).
The persons would have a proper escort to the capital city, meet there, get short instruction (this should be published for all to read ahead of time so no one feels like they are only able to do what someone tells them), and then the process is performed. Everyone goes to lunch and then returns to their lives.