I doubt there is any such answer to reversing the trend. The advance of knowledge has been pushing back against religion for centuries now, and the pace at which we’re gaining new knowledge seems to be increasing.
That said, religion will be with us for a long time to come, as long as people are afraid of death.
Actually, there already is an answer to such a trend: everyone who isn’t religious is dying out. Seriously. Demographics show that as religion fades in society birth rates plummet. This has happened everywhere. European countries are already far below the birth rate necessary to maintain their population and so is Japan and others. The middle east has also fallen well below replacement because of this.
One reason for this is as follows: A person cares only about their “rational” self-interest (these ideas are the current political and economical ideas, not at all my own, of course). In past times children were considered to be an economic benefit, primarily: they would work the farm for you (or other business) and provide for you in your old age. In modern times, they are an economic burden ($220,000 to raise a child to age 17 according to U.S. Department of Agriculture (I think it was Agriculture, at least, maybe a different department)) without even considering college. Furthermore, with the rise of conception and abortion on demand, and the sexual “revolution” (read “perversion”) people put off child-rearing and rarely have more than one or two children. Except religious people, that is, they still raise more children for altruistic reasons, viewing them as a gift from God.
Civilizations have died like this before, societies like Athens and even Rome itself have fallen from “lack of men” by this internal rot. The United States, however, has many traditional veins of religion still alive and well and our growth rate is still at 2.3 because of this.
More to the point, however, people haven’t fallen away from Catholicism because of “science.” They may think they have, but what they really come to believe is the materialist philosophy scientists often believe, not to mention relativism.