I thought of it like this:
If it is found that a person who ran for a political office (or ran for reelection) lost an election due to fraud, then the fraudulent candidate who got them unfairly removed is immediately removed themselves, and everything they did is rendered null and void. The true winner is then returned to office and allowed to continue serving.
However, there are two exceptions:
1. In the event that the true winner is now deceased, incapacitated, or simply does not wish to continue their term, the position instead goes to their second-in-command.
2. If the true winner currently holds the office, either by regaining it and/or beating a candidate who nonetheless cheated, then they are automatically entitled to an extra "penalty" term for each time they competed in a fraudulent election. Term limits do not apply to penalty term(s), but the person must still win reelection to get them. However, they still have the option to resign at any time, and can still be forcibly removed from office.
The only issue I see with this is that Trump could be in office until he's 90 years old, because both 2020 and 2024 definitely had shady stuff going down; if there's one thing both parties don't like, it's people who should be retired that absolutely refuse to leave. But it's a small price to pay for honesty; and it's not like EIGHT more years of him is a bad thing, provided he remains the robust and mentally sharp person he is now.