Pope Leo XIII wrote Rerum Novarum in 1891 AGAINST Socialism as a viable solution to poverty. I quoted yesterday the opening paragraph of this timeless encyclical.
Some time ago I posted a quote from Rerum Novarum, to which one of my readers responded that it was considered "too old" to be taken seriously anymore.
Pope Leo XIII absolutely denounces Socialism in his visionary encyclical that many call a capstone of Catholic Social Teaching. In just paragraph 4 he links the socialist ideal to one of the seven deadlies: "To remedy these wrongs the socialists, working on the poor man's envy of the rich, are striving to do away with private property, and contend that individual possessions should become the common property of all, to be administered by the State or by municipal bodies.(emphasis mine)" He affirms that it's the family--not the state--that is the rightful centerpiece of society, with marriage as its foundation, fatherhood the authority and private property an extension of the Natural Law.
He was most definitely ahead of his time, denouncing Communism decades before the Soviet regime and their socialist counterparts behind the Iron Curtain imposed tyranny upon millions. Soviets coerced, imprisoned, tortured and murdered as many Catholics (and later other denominations of Christians) as they could get their hands on--bishops, priests, religious and laity were all targeted, because to an admittedly atheist government, the Church is its primary enemy.
Think about what an encyclical is: a document designed to guide and direct our Priests and Bishops in teaching us the faith. The contents of this document were of course taken very seriously, and still are. Every pope after him has stood firmly upon what Pope Leo XIII teaches.
If you've never read an encyclical, Rerum Novarum is the one with which you should start.