I think any good democratic candidate could've won the popular and electoral votes. As a political neophyte and a buffoon, Trump should have been easy to beat. However, conversely, since she was generally unlikable and has years of baggage (whether rightly or wrongly), I would also say I think any good Republican candidate could've beaten Hillary. Every presidential candidate from both sides who lost during the last several decades must just scratch their heads and wonder "Why didn't I get to run against ________?".
The democratic nomination was handled very congenially with Hillary already proclaimed victor before they started, so things never got ugly and no "punches" were being thrown (other than on social media). Would've been interesting to see how Bernie would've played out in the larger game when the gloves came off. While much more likable than Hillary, and probably the most honest, believable candidate since Jimmy Carter, Bernie also fits the image of what everyone is rather sick of: old white guy who has been a career politician almost four decades. I don't think that is the image of the candidate the democratic party will eventually pick for next election, so I don't think we will get a chance to see how he would play out in the general election.
2016 was sort of the perfect storm scenario.
1) The Democrats acted throughout the cycle that Hillary was the next president. It didn't help Bernie any, but he did lose in the end by a fairly decent margin. The whole superdelegate thing helped stack the deck in her favor, but take the superdelegates out and she had 2205 won by election (primaries and caucuses) and Bernie had 1846 won by election. That's 54.4% which is a comfortable win. Treating Hillary like the assumed nominee from the beginning may have given her a bandwagon effect that tilted the field in her favor.
2) The Democrats nominated someone who was both boring
and unlikable. The Democrats have nominated some bad candidates in the past, but usually they were just boring. I believe Donald Trump and Hillary Clinton were the two most unliked main party candidates in presidential history.
3) The Russians and other foreign agents were working to throw the election Trump's way.
4) A number of key states that often vote Democratic in presidential election years have been controlled by Republicans most of this decade and they pulled every trick possible to shift the vote for Trump. A statistical analysis indicates there may have actually been vote tampering in some states, though it's probably impossible to prove.
5) There is a tendency after 8 years of one party in the White House for the other party to get it next time.
There are plenty of boring Democrats out there who probably would make a good president. But there are very few who are as unlikable as Hillary too. And the ones who are unlikable are better politicians and more dynamic speakers. It's virtually impossible for the Democrats to nominate anyone as boring and unlikable as Hillary unless they nominate her again, but I don't think that will happen. There are signs Trump's foreign help are giving up on him. And some of the states that were in Republican control in 2016 will be at least partially in Democratic hands in 2020.
The Republicans really have pulled off minority rule up to now. We see where elections are completely fair, Democrats tend to do very well, but in states where Republicans have done everything they can think of to suppress the Democratic vote, they still lost many races in 2018. In some places the game is still very rigged like Wisconsin where Democrats won state legislature races by an average of 9 points and the Republicans have 65% of the seats (there may have been some seats that weren't up for election as part of that, I haven't looked in depth). But the Republican power is beginning to erode because their base is getting too small to allow them to keep winning with all their old tricks.