George HW Bush was the last one to leave office while the economy was doing well. It was going fine at the end of George W Bush’s first term, then the 2007 housing crash brought it down. Trump’s first term ended with the covid lockdowns severely harming the state of things. So… 3 Republican presidencies ago, but that’s a lot of years.
You can only be elected as president twice. You can probably hack the system by getting multiple other presidents to select you as vice president, then resign. If you serve more than 2 years of the term they were elected to, that reduces the number of times you can be elected as president to one.
The 22nd amendment doesn’t say that someone that serves 3.99 years of another president’s term multiple times can’t still be elected, and it doesn’t say that someone not qualified to be elected as president can’t be elected as vice president, but the 12th amendment might. Either of those could be an interesting legal fight.