Karl Marx was saying religion is the opium of the masses in that it helps them to mentally escape the reality of their suffering. Not that it makes religious people stupid. It would probably help if you read the entire quote in context instead of just making stuff up.

Fear and ignorance is the opium of the people. And religion is often a tool used to celebrate that fear and ignorance. But not always. One of Marx's problems is that he was often an absolutist. As are all ideologists. Idealism is how logic dies in the mind.

Humans are governed by fear, attachments, ego, ignorance, and just plain old wickedness. But we don't like to admit this because it basically says that somewhere inside each of us is a animal with no self-control. So we try to avoid this realization by marginalizing the wicked. And for that, you need a scapegoat. And what we usually choose as a scapegoat is that which we have a bias against. That which is the focus of our bigotries.

Marx thought it was the Capitalists, so the capitalists were evil and the ruin of the world. Some think it is religion, so religion is evil and the ruin of the world. I think it is idealists, so idealists are evil and the ruin of the world. Some of the Muslim seems to thing it is gay people, so gay people are evil and the ruin of the world. Some Christians think it is the Muslims, so the Muslims are evil and the ruin of the world.

Voltaire used to say religion is the invention of clerics. Edgar Morin said that when and if human beings disappear, Gods will also face same destiny. Machiavelli believed that religion was what softened the people enough to allow for the rise of absolutism in his own time. Nietzsche said Christianity shackled the mind. In Sigmund Freud, religion could be a twisted view of reality to save people from neurosis inflicted by Marxism.

People and their passions do seem to be the common denominator here. Not religion. Everyone's got their own hatred picked out to brand as evil. When the only evil in the world is the one you see in the mirror.

There never was, is or will be utopia. As something to which people might aspire towards but which, by definition, could never be. There will always be a person or group of people who will seek to subvert the paradigm for power and/or wealth, just as there will always be the mass of people who prefer--whether consciously or subconsciously--to live subserviently under the the boot of authoritarianism.

People have to be unequal to effectively make up ones mind towards salvation which is the absolute aim of every human being. When everyone is equal there is no hope or struggle for survival which is necessary for human upliftment in the realm of mind. In the case of Karl Marx, he was someone who was just hyping one ideology over another.

By the way, there is nothing harmful about the ideas of Karl Marx, if you read his books that becomes perfectly clear. Perhaps you are confusing it with Stalinism, or some other ideology. Assuming that the two can somehow be compared like that, I would have to argue the following. Marxism is a somewhat incomplete political philosophy that many people say cannot stand by itself as far as a working system should can. Most of the proposals in the Communist Manifesto have already been implemented by most of the developed world; end child labor, public schools, government and public banks, a more equal distribution between towns and cities, etc.

Even the Quran says "Indeed, Allah will not change the condition of a people until they change what is in themselves." Rite?

Marx sees religion as agent of exploitation and oppression of masses. He regard it as opium and it does not to solve the problem of masses. Faith is not enough, you gotta work your ass off. Don't use religion as a dope; making you paralyzed in resignation without endeavor.

Religion isn't dangerous. Religion is just words on paper. It is the people who interpret those words who are potentially dangerous. So as always, it is people who are truly dangerous. Not religion. An Utopian society will be one without the presence of human beings.