The OP conflates religion and churches, congregations, etc.
Religion is based in belief (faith). Churches, congregations, etc. are social constructs to share and exchange those beliefs in a community.
Atheism can’t replace religious belief because there’s no there there.
The negative correlation between income and religiosity is a Western model. In the non-Western countries, rich people are as religious—if not more—than poor people. part of the reason is that poor people cannot be bothered with ‘heavenly things’ when they are hungry.
What’s the OP?