Can he or she win after being rejected by the party?
1) too many people would just vote for R or D because that's what they've always done
2) inevitably this candidate would be more right or more left and it would only serve to siphon off votes from that candidate and not the other
So by that logic, if Trump would have been ousted shortly before the election and one of the other GOP primary candidates endorsed by the GOP, then the GOP candidate would have won instead of Trump?
Well, no, not necessarily. The other candidate would have ran against Clinton and may or may not have beat her.
Another example: if Obama would have been rejected by the DEM party for a second term, then Obama voters would have supported Biden or Clinton or some other DEM candidate?
Are you saying the party's votes would get split and the other party would gain a majority? What if both parties split off independents and party-supported candidates? What then?
I'm saying that in your examples.
If Trump was ousted and he ran 3rd party against say Bush. Clinton would have won.
If Obama was ousted and he ran 3rd party against say Clinton. Kerry would have won.
With your 3rd hypothetical candidate who holds positions that both right and left leaning independents would break off for....well, show me that candidate. I laid out a bunch of possible policy conditions. Tell me what candidate would have to do to appeal to both sides.