If you joined the Buddha's community, you lost your former caste status. Apart from that; the Buddha did not overtly oppose the idea of the four castes (priests, warrior/ruling, business & workers), apart from asserting the Brahman caste had no inherent superiority due to birth; but instead, focusing on moral karma. Thus, the Pali suttas are replete with positive statements about the four castes, as though they are a natural order.
The Buddha taught people have different dispositions (MN 12) and thus the Buddha had the view of social diversity. For example, in DN 31, the respective obligations of employers & employees towards each other is clearly stated. This shows Buddhism does not have any communist ideals.
In five ways should a master minister to his servants and employees as the Nadir:
(i) by assigning them work according to their ability, (ii) by supplying them with food and with wages, (iii) by tending them in
sickness, (iv) by sharing with them any delicacies, (v) by granting
them leave at times.
The servants and employees thus ministered to as the Nadir by their master show their compassion to him in five ways:
(i) they rise before him, (ii) they go to sleep after him, (iii) they take only what is given, (iv) they perform their duties well, (v) they
uphold his good name and fame.
Therefore, Buddhism, socially, does not adhere to a monolithic social order of only workers. The idea of a monolithic culture is Judaic, as shown in the Old Testament. Marxism possibly unconsciously (Marx was a rabbi's son but an atheist) modelled itself on the Judaic ideal. For example, the original Kibbutz culture of modern Israel appears not Marxist but traditionally Jewish.
In addition, while original feudal Capitalism was based on theft (i.e., the military seizure & ownership of land by the nobility war lords), Industrial Capitalism was based in technological innovation thus Intellectual Property (IP). In other words, the seizure of IP by the working classes under the Marxist model is theft, which is contrary to Buddhism.
In short, Buddhism as about the interconnectedness of the diversity of society. In Buddhism, business is grateful to labour and labour is grateful to business.
Where as the modern dialectic (?) political philosophies of Capitalism & Marxism are each selfish ideologies that lack gratitude for their self-declared yet needed 'nemesis'. They divide society.
Many people today look on life in all sectors as a struggle between conflicting interests—the “bosses” against the “workers,” the
“government” against the “people,” the “rich” against the “poor,” and
even the “women” against the “men,” or the “children” against the
“parents.” When the aim of life is seen as material wealth or power,
society becomes a struggle between conflicting personal interests, and
we are in need of an ethic to protect those interests. It is a
“negative ethic”: society is based on selfish interests—“the right of
each and every person to pursue happiness”—and an ethic, such as
“human rights,” is needed to keep everybody from cutting each other’s
throats in the process.
The Buddhist teachings are a “positive ethic”: well-being, rather than power or riches, is the aim; society is seen as a medium through
which all people have equal opportunity to maximize self-development
and well-being, and ethics are used to facilitate those ends
Buddhist principles for a fruitful and harmonious life by P. A. Payutto