First thing is, people worried about terrorism aren't really worried about terrorism as it is now. They're really worried about what terrorism and ethnic conflict will be like in a few decades when, for example, Muslims are majority in some European countries. Muslim majorities are predicted in several major European countries, using basic conservative demographic projections, this century. How will that be to live in? For a prototype of that, you can look to Lebanon, or how Christians have been faring in Egypt in recent decades.
Here you have to make the distinction between the steady problem and the unlimited-growth problem.
The steady problem is "homegrown" terrorism. While there is always some level of terrorism coming from all groups, that should be addressed with the usual deradicalization and politics programs. Those approaches solved the issue with, for example, IRA terrorism. Which is a good thing, because we have to live with our own people.
The real issue is the one that will grow without limit due to ongoing demographic replacement in the West by Muslims. That's what people are worried about, because people understand that unlike homegrown terrorism, the Islamic terrorism problem can become infinitely bad, and you can end up like the Christians in Egypt. No magical historical force prevents French or Germans or British from ending up living under such deadly tyranny. Sadly, the only real way to stop this is to cease Muslim immigration until some of these data [1] start looking a lot more promising (which will take a century at least). There's certainly no shortage of people wanting to move West from places like India and China, so I see no problem with choosing immigrants who will create better outcomes (and we do that anyway).
If we're willing to discriminate on age and education, we can discriminate on religion - especially when a religion's core beliefs, as interpreted in all its mainstream schools of thought, explicitly opposes the basic egalatarian democratic values of our society.
[1] http://www.pewresearch.org/fact-tank/2017/05/26/muslims-and-...