If you mean that the messaging on trans rights alienated swing voters then I think it's probably true, but moderates and swing voters do support general anti-discrimination laws but are wary of policies on sports participation and youth medical care.
If you mean that it was the centerpiece of their identity and everything that were campaigning for, and their pivotal, most important issue, then I don't think that's accurate.
But they did deliberately elevate transgender rights as a moral and civil rights issue. This was a trade off (energize progressives, lose some moderates). Conservatives effectively focused on targeted attacks (bathrooms, sports).
I think that maybe the gamble didn't pay off. The messaging should have probably been about protecting from discrimination, and debate should be focused on attacking republican establishment for being aggressive and hateful.
But really all of this doesn't matter. A better candidate, a white or latino strong charismatic man would have beaten Trump.
I don't hold it against them that they didn't budge on this one. Beating up on a minority for political points is morally repugnant, and the whole appeal of Democrats is that they have some kind of integrity.
The "moral lepers" thing feels to me like a distortion of reality. The actual Democratic politicians generally didn't engage in denigrating their base. Maybe you mean people on the disgusting website.