I don't think I addressed this:
The reason this result surprised the media was because they consistently marginalize the importance of the white voting bloc. And to be fair, the DNC bought what the media was selling which is why this result went against them despite going up against one of the most unqualified, boorish, and generally undignified candidates imaginable. He was the only one speaking a language that appeals to the economic victimization that lower to middle class whites feel...and this was a powerful message that cracked a Democrat Midwest bloc thought to be untouchable by the GOP; giving Trump the EC win despite a popular loss.
The problem with the modern Democratic Party is they are unwilling to address economics in progressive liberal terms. Well, they had their guy to do just that but even after he exposed their Midwest weakness in Michigan...they railroaded him. The DNC is unwilling to address victimization that doesn't exist within a racial/gender/religious context. Clinton only really talked about the glass ceiling all the while the average middle class person is feeling the pressures of an economy that seems to be leaving them in the dust.
The problem for the Dems is they are going to attack that pressure - correctly - by identifying the problem as unprecedented wealth redistribution towards the top earners and the nearly 40-year conservative attack on funding the public sector, education, and other things that can help put the middle class on better footing. They don't want to be labeled commies because they still have PTSD of the Solid South leaving them in 1968 or something. But my point is: who cares? Let the Alabamian call you a commie, you weren't getting their vote anyway. If you get every major population state and the more liberally receptive white working class midwest, you win your election this year and probably for a long time going forward.
Trump winning was a botched job by the DNC more than a strike of genius by the GOP and Trump. His message was the absolute right tool to break a weakness in the DNC's Midwest wall but they had the candidate to avoid it but they submarined him.
You are right in that it was certainly no stroke of genius on the part of the GOP. OTOH, Trump did know many of the right issues to embrace, but it didn't take a genius to know them. IMO, the issue that broke the ice was illegal immigration, though economics, as always, was a major issue. In fact, several issues, including illegal immigration, were important, at least partly, because of their economic effect. But economics was hardly the only significant issue as has been noted by many in this thread. Many of the losers will try to dismiss the loss by insisting that the reasons were superficial but they were primarily serious.
Socialism cannot be the answer to any economic woes. It may sound good in a lab, but it NEVER works in real life because it ignores human nature. The only reason it has seemed to work briefly in Europe is because the capitalistic U.S. has relieved them of the massive cost of defense and has fueled the world, and especially the European, economy, by its now waning capitalist vigor. More gov't spending is not the solution, it simply exacerbates the problems. But capitalism and democracy only work with a relatively righteous and therefore, reasonable, people. We are no longer either.
It appears we now have a brief respite from the headlong run into socialism born out of a misunderstanding of human nature, as well as cowardice and laziness, etc., but the trend is downward. We have become so blind that a socialist almost became the Dem nominee. The ultimate problem is not political or social but spiritual.