isn't it more that people cleave to magical thinking, archaic though it is, because they have trouble dealing with the despair of poor health and final death?
one big support for this is the gradual decline of religiosity in areas of the world where life is improving. conflated, of course, with the hegemonistic aspect of organized religion.
Possibility remains that adverse conditions are not being masked by psychological devices, rather that these conditions are conducive to heightened spirituality (which may be present in varying degree in all humans).
one big support for this is the fact that many saints came from affluent backgrounds and chose the device of asceticism ("harsh life", "corporal despair", "terminal denial of certain pleasures", "dying to earthly life") to heighten their experience of spiritual communion and worship.
One argument is that we simply replaced the archaic (religion-focused) dogma with a modern (consumerist, individualist, hyperpoliticized) one, but their function is the same, to serve as complex death denial rituals.
one big support for this is the gradual decline of religiosity in areas of the world where life is improving. conflated, of course, with the hegemonistic aspect of organized religion.