I do get why Trump was elected. There was a large percentage of the population that felt the American dream was out of their grasp and no one cared. It is a legitimate issue, which I attribute a great deal to income/wealth disparity, which I believe to be one of the great shortcomings of America and a very under discussed issue. The ground was fertile for a populist leader.
The problem, however, was Trump was neither true populist, nor a leader. He merely played one on TV. The man fundamentally stood for nothing but the personal glory of Donald Trump. He had no platform, no political philosophy, no real agenda, hence no clue how to actually address the needs of the people, nor was that problem for him. He just wanted their undying love. What Trump was good at, however, is reading the room and knowing how to manipulate the crowd. He was the consummate salesman without the goods, but he could sell a brand. However, as he woefully lacked substance, in the end, he was nothing more than a false hope; a fraud. He was the wrong general for the right battle.
Though you bring up a great point about the American political environment as fertile ground for nationalism, which goes to somewhat explain why it allowed Trump to be elected, it does not explain the Trump presidency, which was fundamentally fraudulent by design.