Marx’s critique of religion, based on Feuerbach’s, about alienation and the role of gods is quite an accurate critique of false religion or idolatry.
The fact that Marx goes beyond Feuerbach, and extends the theory of alienation to capitalist production shows that much of what capitalism does is to turn the product into an idol and production into a false religion. This is in line with Jesus teaching about being unable to serve two masters, God and mammon.
It’s important to make the distinction between ‘the market’ as the belief that I can exchange part of my goods for gold, and the gold for other goods in order to benefit from others’ goods, and ‘Capitalism’ as a system based on the alienation of labour to systems of production driven by profit, and the belief that the whole of human society should be regulated by such a system. Markets have existed long before capitalism, and can be good in themselves, but they are not the only good.
Traditionally, the Church was always opposed to usuary, or the charging of interest. This is because it is against natural justice, it leads inevitably to a system where the rich get richer and the poor get poorer. In the end, the Church simply caved because every country in the world was operating interest charges. Some radical Islamic clerics still oppose usuary, and with good reason. Perhaps the Church needs to take more of an interest in how wealth is created and distributed by our global monetary system. It is far from fair. That’s not to say that Marx’s solution was much better, but his criticisms of capitalism are still valid.