there’s a Lawfare Podcast about it the other day. it varies by state, but essentially the legislature has powers to do that if the election is contested, as in they have to throw out a bunch of ballots, or impossible to determine the winner. in NC there’s an unresolved problem of possibly governor not being a part of legislature, so he may not be in position to veto.
In addition, unless a state’s race is literally too close to call without a recount, I’m not seeing how legislators are going to have the balls to openly steal the votes from the majority of their residents, since there would likely be protests at legislators’ homes if not actual riots or worse.
Here is how the riot went down: the cops ended it violently, with the aid of the local militia. End of riot. No charges were filed except against the surviving Democrats.