Religion has problems with modernity. Without fail. It has to happen. Religions pump out the idea that they have infallible truths which are immutable. If there is something that's immutable that is that nothing is immutable.
But still we have morons who go about saying that their religion is the best and they are very happy to kill for it. Read a Ricky Gervais quote. Blasphemy is the idea that an all powerful god is upset because somebody said something bad about him. That's the level of thinking that religious people believe.
So what do you do? This article gives an indication. Educate the populace and that will reduce the stranglehold of the priests and mullahs on the populace. Proof.
Then again, a significant number of terrorists are highly educated. Counter factual there. And it's not necessary that higher education always leads to good civic behaviour. The ex president of Egypt has a doctorate. The ex president of Iran is an engineer. And both of them have religion coming out of their asses.
The Effect of Education on Religion: Evidence from Compulsory Schooling Laws
For over a century, social scientists have debated how educational attainment impacts religious belief. In this paper, I use Canadian compulsory schooling laws to identify the relationship between completed schooling and later religiosity. I find that higher levels of education lead to lower levels of religious affiliation later in life. An additional year of education leads to a 4-percentage-point decline in the likelihood that an individual identifies with any religious tradition. This is a reasonably large effect: extrapolating the results to the broader population would suggest that increases in schooling could explain most of the large rise in non-affiliation in Canada in recent decades.