An analysis from the British press suggests that the DNC shot itself in the foot by rigging its process for Clinton instead of Bernie.
If the Caddell hypothesis is correct, as I think it is, the Sanders campaign was much more likely to succeed against Trump than the Clinton campaign. This is because they both were on the same ground on the 80% question of whether the system was about the control and enrichment of a self-serving elite. Since the force of that question would have been disarmed, the attacks on Trump's character would have been far more telling even than they were.
Instead, the contest became one between the living symbol of rigged systems for the well-connected, and an outsider. Trump was still damaged by his bad moral conduct towards the weak -- as he should have been. Refusing to keep to your agreements to pay your contractors, to pick one example of such conduct that happens to be stripped of the sex/race connotations that can make debate difficult, really is the mark of a scoundrel. That is the sort of thing that ought to be damaging if it is true.
It wasn't damaging enough just because of the 80% question. Bernie would have won in a walk, I think, in spite of the very good arguments against socialist solutions to some of these problems. Only Clinton was sufficiently symbolic of the thing many voters wanted to reject to have possibly lost to Donald Trump.
UPDATE: An article in the Washington Post makes an allied point.
UPDATE: Bernie campaign leader: "We have nothing polite to say right now."