The National Archives’ web page has this compendium of state laws on punishment for presidential electors who cast a vote in the Electoral College in December for someone other than the candidates they were pledged to.
The list of states says there are three state laws that say electors who vote “disobediently” shall be deemed to have resigned and will be replaced by the remaining electors. The list says these states are Michigan, North Carolina, and South Carolina. However, the South Carolina law does not actually say that, and furthermore the South Carolina law says the state chair of the political party involved may absolve a disobedient elector if the state chair believes that the elector’s behavior was beneficial.
For Michigan and North Carolina, the law saying that a disobedient elector automatically resigns, and will be replaced by the other electors, would not function effectively if all of the electors from that state disobeyed; there would be no one to replace them. Thanks to Jerrick Adams of Ballotpedia for the link.