Freedom of discussion is the cure, not the problem
An academic article published this week finds:
We find that freedom of discussion in particular is substantially associated with less terrorism and argue that freedom lowers the risk of terror due to two types of mechanisms: (1) more freedom of expression makes it easier for the police and intelligence agencies to effectively gather information on potential terrorists and targets, and (2) freedom of expression works as an outlet for displeased citizens through which they can openly express their discontent instead of resorting to terror.
You don’t trade off freedom for security. In fact it isn’t a trade off. Less freedom makes you less secure.