Sure there are, quite literally Ordering a new election from scratch is a not-unheard-of remedy for election irregularities for which there is no other way to correct the irregularity.
In the US, I haven't seen any indication we have rules for a new election. We certainly don't have such rules for the president, except that the electors can be selected by state legislators and if the electors don't provide a result, US legislators can select the president.
https://www.nbcnews.com/politics/congress/republican-candida...
In 2000 Bush vs Gore, the Supreme Court canceled the recount. That’s the closest I’ve seen to the courts stepping in to fix a mess.
The (completely optional) popular elections for US Presidential electors don't generally have laws that would support a judicially-ordered revote as a remedy because they have a built-in after the fact legislative remedy, since the legislature ultimately decides the mechanism by which electors are assigned (and can simply do so itself), and can revise it's decision even after a public balloting has occurred (in principle, such an retrospective change removes the states electoral votes from the safe harbor provision that applies to procedures fully adopted in advance, but then the safe harbor rule itself is unenforceable and effectively a symbolic statement of intent.)
But that's a fairly special case, and a result of the peculiar design of US Presidential elections, not something general to elections.
This doesn't prevent a do-over, it just means that it wouldn't come from judiciary. It also means that the decision would be highly partisan.
While not about do overs (but potentially about legislative intervention in other ways), that's why the anti-mail-ballot propaganda (and Trump's double voting advocacy) is heavily targeting Republican-legislative-majority states that are polling close or leaning Biden.
[0]: https://en.wikipedia.org/wiki/1974_and_1975_United_States_Se...
[1] https://en.wikipedia.org/wiki/2016_Austrian_presidential_ele...
There’s also some theories that voting at home on something like your phone is far more subjected to coercion. This is why some states refuse to go 100% mail-in this year, even at the expense of public health. Sure, someone can always threaten you to vote a certain way, but polling places are designed to prevent that as much as possible.
Then there’s just us, the population. We live in an age that people doubt vaccines, or think the earth is flat, or that COVID 19 is a fake crisis manufactured by the Democrats to win the election. If 100% of votes are done digitally, some group will undoubtedly not believe the outcome of the election.