I think you've nailed it here. The average citizen who feels the pinch of fewer jobs or lost wages wants someone else to blame, and certain politicians, as you say, will take advantage of that.
The deal is, however, those feelings, tribalistic as they may be, must be taken into consideration before this kind of movement begins to rise. Because, movements like this do not rise in a vacuum. They are a reaction to the things you mentioned -- feelings of being suppressed, and those governments who do not see and do not address those feelings from the very start are likely to witness movements like this down the road.
One of the problems comes in trying to shame the people into acting differently -- it creates resentment, which keeps building until it boils over and a movement like this gains power. It's all avoidable if wise people are governing. When it happens, it's usually the case that the leaders have alienated (maybe intentionally, maybe not) some of the people and minimized their concerns. It happened in the US and contributed to the election of Trump and the *slight* increase of nationalism.