Religion being an “opiate of the masses” was never meant to be a diss. Remember that in Marx’s time opium was used as medicine. The real meaning of the quote is that religion helps the masses numb the pain of living under class oppression but also pacifies them to the point of keeping them from rising up. And frankly it’s an overly simplistic view by Marx, religion has played an important role in many liberation movements.