Religions are solutions to the generalized Tragedy of the Commons, an inevitable and potentially lethal threat to almost any geographically located community of people larger than an extended family tribe. And Marx was dealing with that same issue in the new context of capitalist industry - hence similarities in his approach, and willingness to borrow from the solutions of the past. By the "opiate of the people", read: something that eases suffering - a good thing, in its role. Something people want and need and should not be denied, when they are in pain. With "from each/ to each" find a criterion for evaluation of results, not a mandate for particular means. And yes, I can easily imagine a Buddhist or Taoist or other recognizer of egalitarian principle (at least) agreeing with it, as far as it goes. Would any sensible person praise a setup built to waste ability on the one hand, and shortchange need on the other? The inability of modern science or technology to handle that larger question of context, to formulate or establish a solution - an appropriate system of regulating means and ends - to Hardin's problem, is not a flaw of modern science or technology, not an intrinsic evil, any more than it was for a similar inability of older advances such as agriculture. What's failing here is religion.