I think that, as people are faced less with death and illness, they turn away from religion. Today many happily live until a very old age. There is just less need for the kind of comfort that religion provides us with.
Religion is not slowly, but quickly dies. I think that it is for this reason that in recent years more and more we see the hidden advertising of religion. The more educated people are the less they believe in fairy tales.
Religion is not dying. The focus of religion is simply changing.
In the past, religion was focused on God. Now it is focused on the science fiction made up by people. Here is what I mean.
Science theory is theory because it does not have enough evidence to prove that it is fact. Consider Big Bang Theory. It is not known to be fact, and it probably will never be known to be fact. Yet look at how many people around the world talk like they believe it is fact, based on some probability calculations, that are not known to be correct. Looks like science is becoming a religion.
