Back the wrong horse in nothing but to support someone or something that cannot win or succeed. (Also literal, as in horse racing.)
I don't want to back the wrong horse, but it seems to me that Jed is the better candidate.
Fred backed the wrong horse in the budget hearings.
It was only after we'd invested all the money that we discovered we'd been backing the wrong horse
Dem donkeys back the wrong horse in Salt Lake City