I used to work in prisons.
I've been employed in 3 different prisons in 2 states, from a parole violators' sanction facility to a "supermax" state house. Teaching, counseling, program development; offering ways for inmates to put together skills and thinking habits to increase their success on the outside.
Anyway, this problem of a few violent terrorists who don't play by others' rules brings to mind a phenomenon I saw in every lockup I worked in: Inmates who wanted to do their own time, work the programs and use their incarceration as a chance to grow and develop often had their opportunities spoiled by a (very) few shit-stirrers whose whole project was to wield power by ruining whatever they could of the freedoms granted to participants.
Now ISIS, or whatever group is ruining things for everybody else, have their political and/or religious demands, but their behavior is pretty much the same as those asshole inmates. And I never saw a prison administration that was able to successfully prevent the few from poisoning everybody's well. We still had to run programs, so we kept muddling along - and I think, as long as there are bad actors with powerful weapons, the civilized world will have to muddle along as well.