It is very improbable that Trump colluded with the DNC to hijack the republican ticket, in order to present HRC with the worst possible opponent, and assure her victory. And that even then, they underestimated what a toxic candidate she was.
But I have not yet heard an explanation for what happened during the election that makes any sense.