Religious extremism depends on early childhood indoctrination and a homogeneous message with no outside influence. So the way to stop religious extremism is to break this cycle.
All religions have the same Achilles heel… Reality. AKA: Outside knowledge, western / secular thinking (atheism).
Boko Haram knows this, because their name means “western education is sin”. And many of the nations that are the sources of religious extremism have blasphemy laws to protect their followers from outside ideas. In doing this they have inadvertently confirmed outside knowledge as the greatest threat to their survival.
Even Christian mythology confirms this by identifying man kind’s original sin as the quest for knowledge, as symbolized by Adam eating an apple from the tree of knowledge. And Catholic doctrine considers atheism (secular knowledge) to be it’s single greatest threat.
Therefore we should capitalize on this weakness and redirect most of the worlds defense budget and all of it’s foreign aid to educating their children to our western ways of thinking.
Rather than sending soldiers, guns and bombs into these countries we should conquer them from the inside be sending teachers and building schools and an internet and communications infrastructure.
The average parent in these countries would love for their children to get a good education and good nutrition. We can win the parents hearts by giving them the jobs of building the schools and other infrastructure, and feeding and educating their children.
And by educating the children and giving them access to the outside world, we break the hold that religions have on their innocent minds and eliminate them as potential recruits for the religious extremists.
Problem solve and everyone wins: Except for the religious extremists.