In my unbiased opinion Gautama Buddha did somewhat support and oppose the caste system.
Opposition:
- Anyone of any caste can join the order
- Anyone of any caste can become an arahant
- Laws of kamma apply to all castes
Support:
- States that people gain higher or lower births based on karmic causes
- Sammasambuddhas are always born as high caste (Kshatriya, Brahmin)
The Assalayana Sutta and many other suttas seem to oppose the caste system:
"No, Master Gotama. Even a noble warrior... Even a brahman... Even a
merchant... Even a worker... (Members of) all four castes — if they
take life, steal, engage in sexual misconduct, tell lies, speak
divisively, speak harshly, engage in idle chatter, are greedy, bear
thoughts of ill will, & hold wrong views — on the break-up of the
body, after death, reappear in the plane of deprivation, the bad
destination, the lower realms, in hell." (MN 93)
But then it's explained that Upali a chief arahant was born in a low-caste womb because he in a past existence as a Kshatriya had insulted a Buddha:
"Sneering at the Self-Become One, peaceful-hearted and attentive,
today, due to that bad karma, I am born in this low-caste womb.
Don’t transgress even one moment; you will grieve for the moment
missed. The moment is prepared for you: endeavor now for your own
good." (Tha Ap 8)
The caste system still exists informally in countries where there's no formal caste system and the laws of kamma still apply...people are still viewed as like higher or lower caste automatically they still gain more fortunate or less fortunate births regardless.
But the caste system (whether formal or informal) only applies to lay people not to monks. A being who attains arahantship/enlightenment/perfection is beyond such a conception of any caste and is higher than non-arahants regardless.
Since the number of past existences is countless we've all experienced higher and lower existences many times before:
"When you see someone in a sorry state, in distress, you should
conclude: ‘In all this long time, we too have undergone the same
thing.’ Why is that? Transmigration has no known beginning. … This is
quite enough for you to become disillusioned, dispassionate, and freed
regarding all conditions." (SN 15.11)
"When you see someone in a good way, in a happy state, you should
conclude: ‘In all this long time, we too have undergone the same
thing.’ Why is that? Transmigration has no known beginning. … This is
quite enough for you to become disillusioned, dispassionate, and freed
regarding all conditions." (SN 15.12)