Consider something else, reproduction. While not all people want to have children, it is a major desire of many people. How do we ensure equal opportunity of reproduction to all who wish to have children?
I do not think that Socialism itself does away with the problems of humanity, but it does away with the power relationship between proletarian and bourgeois, and also all those other historical classes.
Communism isn't about equality of outcomes, it's about having the ability to apply your labour in the way which you are able to, in order to provide for yourself. Of course we must work to live (which is unfortunate, but Socialism helps mitigate that by voluntary means). It is totally fine, in my opinion, to have more than the other person next door. In a Communist society, the only reason why you would have more is because you worked harder, put more hours in, or were more efficient at what you do than the other person.
With regard to children, I don't know how to answer that question, and I don't know if there exists such a way by voluntary association which leads to such an outcome as perfect equal opportunity for reproduction. I would be very interested in finding a way, though.
Karl Marx died in 1883 so while he was probably able to make guesses about how steam engines would be deployed in the future he never lived to see an actual automobile. Adam Smith's economic insights were likewise somewhat limited by the technology of his day; one has to be careful not to attribute knowledge that we only enjoy with hindsight to economic theorists of earlier eras.