There are two ways to interpret this. One is that when we're talking about the "richer" candidate, what we really mean is the campaign that spends more. There is already an answer showing that isn't true, as there have been three exceptions from 1960 to now: 1960, 1964, and 2016. This is rather clearly the claim from the question:
Every election in American history has been won by the party with the most money to campaign.
The other way is that the richer candidate is the person who happens to be richer. I don't think that this is the claim from the question, but others disagree. This interpretation may fix the three exceptions. John F. Kennedy was almost certainly richer than Richard Nixon. Lyndon B. Johnson may well have been richer than Barry Goldwater. Donald Trump was almost certainly richer than Hillary Clinton.
Wikipedia has a list of presidents by net worth. The list is based on "The Net Worth of the American Presidents: Washington to Trump". 24/7 Wall St. 247wallst.com. November 10, 2016. Retrieved April 10, 2019.
John F. Kennedy $1100 million
Richard Nixon $17 million
Lyndon B. Johnson $109 million
Donald Trump $3100 million
Bill Clinton $75 million
It does not include Barry Goldwater, who was never president, but another source puts Goldwater at less than $1 million.
Hillary Clinton is not included, but presumably she had the same net worth as Bill.
Kennedy is not listed on Wikipedia so went back to the source.
Even assuming that this fixes those three exceptions, it opens up a whole new set.
Barack Obama $40 million
George W. Bush $39 million
Now, let's compare to three of their challengers.
Mitt Romney had between $190 and $250 million (source), which is greater than Obama's peak of $40 million. Obama's peak came after Obama left office. In 2012, I believe he had $10-20 million, mostly from book royalties. Example source.
John McCain had at least $20 million (source). By the same source, Obama had less than $4 million in 2008. It's also worth noting that most sources peg Cindy McCain's wealth at $200 million. Regardless, $20 million is larger than $4 million.
John Kerry had $274 million in 2004 (source) and was the richest Senator. This is well ahead of George W. Bush's peak net worth of $39 million.
So of the last four presidential elections, three were won by the poorer candidate.
Under this interpretation, the claim actually does worse. Of course, that may be because the current situation is different. But looking back further finds that Herbert Hoover was richer than Franklin D. Roosevelt (both are in the Wikipedia list). And Teddy Roosevelt was richer than Woodrow Wilson. In 1992, Bill Clinton was much poorer than George H. W. Bush (although he would later become richer).