Aren't you referring to Richard Dawkins infamous description of religion as a kind of virus?
One does not need to be a sceptic to note that Martin Luthor King was a Christian and that Gandhi was a Hindu to think that this is perverse and dogmatic way of looking at religion.
Nor does one need to be a sceptic to ask well, why stop there? Is science a virus, or how about language? Or even socialisation or sociability. And what about athiesm, is that a virus too? How does one demarcate the difference between ideas that are virus-like and ideas that aren't? Should one set up a tribunal? Perhaps Dawkins might distinguish between good viruses and bad viruses of the mind; between benign viruses and malign viruses.
Dawkins of course is being polemical. He's an athiest evangelising athiesm. Though like any evangeliser he's not evangelising, he is merely telling the truth and getting people to wake up to the truth. He's on a truth-telling mission. He's a misdionary of the truth. The question then is whether there is any truth to the matter. Well, we know what viruses look like. Natural history, Zoology, Biology and biochemistry are actually empirically based sciences and not ideological; eventually, through experiment, through serendipity and educated guesswork viruses were actually tracked down and shown to exist. You can look through a scanning electron microscope and actually see them.
There is no hope of that occuring with the viruses of the mind that Dawkins is talking about. I don't think any serious scientist can hold out such a hope. But of course Dawkins as a serious scientist knows that there are no such things; and he is merely using a vivid image to describe religion as a kind of 'mind-trap' as you've described; maybe he would describe it as a bad meme; the word he invented to describe a unit of culture in analogy to genes as a unit of genetic inheritence.
Daniel Dennett rather approves of memes - he says words are memes too; but the history and analogy seems to me to be all wrong; no-one knew what the unit of inheritence was once Darwin first published his theory of evolution and it took some time - over a century - before it was tracked down in Cambridge by Francis Crick & James Watson (apparently after 'borrowing' the data from Rosalind Franklin and then not crediting her - you wouldn't believe scientists to be that unethical, because, let's face it, scientists by their very nature are ethical, honest and sincere. To which, one might say, you're confusing scientists with science).
But with memes, words are right there in open view; and so are sentences, paragraphs, chapters, whole books and even libraries; there's nothing there to be really discovered. It's an ideology in the disguise of a science and it's worked too. People talk about memes, and it wouldn't surprise me if there is a centre devoted to the study of memes and a discipline called memology and people called memologists.
Daniel Dennett is also known to call for a serious study of religion; I'm sure he knows that religion have been studied for centuries now from many different angles; but I take it, mainly by religious people who are committed to religion; what he wants, it seems, is a study of religion to be undertaken in a serious manner by philosophers, and I think by this he means athiestic philosophers. He says he wants religion to be studied in a naturalistic manner. Instead of thinking of it as bizarre, strange, odd or a virus and a mind-trap or laughable, avatistic and infantile he's insisting that they take it seriously.
Though I do wonder how much of an insight can someone have if they have no real sympathy with their subject; after all, when I think of Richard Attenborough as a naturalist it's obvious that he takes real delight and wonder in all the manifestations of nature and it's that profound affinity he feels with nature that comes across in all the work he has done; and one would wonder, would he had been a tenth as good a naturalist had he not that affinity. Likewise too I think with religion.