Few books have had a greater impact on me that Gregory Clark's A farewell to alms: a brief economic history of the world.
The describes how a process of natural selection operating generation upon generation created a population psychologically adapted to generate the industrial revolution and modernity.
This happened because the 'middle class' of cognitive specialists (merchants, clerks, craftsmen) had larger surviving families than the peasants, and even than the aristocratic upper class.
Biologically, the middle classes had higher fitness.
Since attributes such as intelligence and personality are substantially hereditary, this meant that the middle class psychology (intelligent, hard working, placid etc) permeated the whole of the English population (by some upward, but mostly downward, class mobility).
One aspect of this may have been a population-wide increase in 'this-worldliness', and a decline in spirituality, other-worldliness, devoutness.
If reproductive success in medieval England was associated with an orientation towards long-term security and prosperity, and increased effort at economic success - as apparently it was - then the population of England would, generation-upon-generation, become more this-worldly.
Or, at least, the personality-type would make this outcome more likely (since free-will potentially enables a person to choose against their disposition).
If this happened in England, it presumably happened in similar places.
The process went into reverse from about 1800 when middle class behaviour (high intelligence, conscientiousness) became associated with lower reproductive success due to self-limited fertility.
And this has continued until the middle classes are reproducing at at half the rate necessary to replace themselves.
Later work by Clark has shown that a poor man in 1800 left behind many more descendants than a wealthy man in 1800.
Thus, since 1800, it is a plain fact that the poorest classes have (biologically) the highest fitness.
So we may assume that if psychological traits associated with worldly success (worldly traits) were selected from about 1000-1800 AD, then the opposite has been the case since then.
But the native English population was, by 1800, very worldly by international standards - so it would take several generations for this to be reversed.
However, probably, by now, the native English worldliness is well on the way to being reversed - rapidly assisted in the past decades by mass immigration form nations which never had been through adaptive selection for worldliness.
This resembles a pendulum swing in relation to worldliness.
In a religious society, there will always be potential for some groups to enhance their reproductive success by aiming at worldly success rather than spiritual goals.
(Inserting a wedge between religious success and worldly success.)
Insofar as they are successful they will change the population in the direction of increased worldliness, until fertility declines in the worldly group.
(Fertility will tend to be lower in worldly people since worldly goods must be foregone in the short term in order to have children.)
Then the unworldly will out-reproduce the worldly to make a more religious society.
And so on...
...for a while anyway; because this is not a true cycle with periodic return to a prior state, since adaptations can seldom wholly be undone nor lost adaptations precisely replaced. And because history has a direction and an end.