I don't think either party would re-nominate a general election loser in this day and age.
It's a small sample set.
Carter lost 44 states, but the party nominated his Veep. Mondale lost 49 states, so he couldn't recover from that. Dukakis lost 40 states.
Dole and McCain were as old as they could be as presidential nominees. Gore led in polls in 2004, but opted to be a messenger on environmental issues (which has made him pretty wealthy.) Kerry won a weak field in 2004, when it was determined that a war hero would be a good challenger to Bush. In 2008, a white guy who had been in the Senate for 24 years just didn't fit a message of change, although he considered running. There is some chatter about Romney, mainly due to Christie's scandals and questions about Jeb.
The things that make Hillary a strong candidate in 2016 won't all disappear in 2020. She'll still have an impressive resume. She would likely still be in the position to be the first female President. She'll still have friends in high places among fundraisers and party figures. A credible bid doesn't seem inconceivable.