So those who do pander to those concerns end up winning the vote, and then they can trash our civil liberties. This is precisely how we British have ended up voting to leave the EU.
There has been a significant increase in the frequency and effectiveness of terrorist attacks in Europe. People are growing more worried about it. We need to make those people feel safe again, and we're not going to do that by saying "my privacy is more important than reducing terrorism".
The argument you make at the end is the strongest point: on the one hand we are nurturing terrorism by not dealing with the fallout of globalisation, and our governments have been sold an expensive algorithm that they believe can handle the problem, when in reality it will make us even less secure. Meanwhile, the media can sell more advertising with the increased attention, so they're quite happy to add fuel to the fire.
However, all these arguments end up being lost in whether it will work or not, and the Donald Trumps will always win that argument because they go to a lower denominator. If we want to win it, we need to show more genuine empathy.