See I wish someone on the farms gave enough of a shit about Hinduism to be an expert and clarify for us, because I've heard it in many variations, that samsara never ends under Hinduism so caste roles are cool forever, and that caste stuff is treated as wholly separate from Hinduism, and that Hinduism deliberately turns a blind eye towards caste stuff because caste stuff is no bueno under some interpretations of Hinduism
Based upon my interpretations from various people I've known I think your interpretation is probably the most accurate and falls under "Hinduism is separate from caste shit"
It isn't separate from caste shit, but some scholarship does indicate that the caste stuff was tacked onto the oldest scriptures (but this was 1000-2000 years ago). Hindu scriptures consist of many different "books" which were written at different times (Hinduism as a whole is not a particularly monolithic religion unlike the Abrahamic religions) so Hindu beliefs generally vary widely. The more recent (mind, this is still at least 2000 years ago) books clearly mention castes and such, while in the oldest ones (the Vedas, 3000 years ago) it seems that castes were initially more akin to economic standing/jobs and careers rather than hereditary social classes. Anti-Brahmin scholars typically attribute the solidification of castes to Brahmins (the priest class) trying to secure their place in society by modifying/adding onto the scriptures to place themselves at the top.
However, casteism is definitely a part of "modern" Hinduism. Not that Hinduism isn't fluid enough to preclude it, but it is certainly a part of modern Hindu beliefs (though that is changing) mostly because most Hindus also believe in a Hindu caste system (most Hindus being rural, poor, and under- or uneducated entirely - India's population is 60% rural).
A note on casteism as it is practiced currently: there are four traditional castes (and thousands of subcastes, basically ethnicities at this point): brahmins (the priest caste), kshatriyas (the military/warrior caste), vaishyas (the artisan/merchant caste) and shudras (the dirty work/untouchable/etc. caste), as dictated by Hindu scriptures. Casteism is almost always the lowest caste (considered "unclean") being discriminated against by the other three, and this discrimination is strongest in rural areas where caste-based stratification is strongest, and weaker in urban areas (where casteism still occurs, but is less severe due to development and the rule of law). People generally marry within their caste - intercaste marriages are rather taboo - and typically within their subcaste/community as well, though this is more malleable as people from different communities intermingle more and more commonly in cities.
To combat casteism, through affirmative action, the government guarantees a certain proportion of government jobs and positions (e.g. admission into public universities) according to "category", there being four categories:
- "scheduled castes" (ethnicities/communities that traditionally were lower-caste and discriminated against),
- "scheduled tribes" (yes, India also has "original occupants"-like communities like the Anglophone countries, mainly delineated by their holding of certain animistic/non-Hindu/major religion/etc. beliefs and and their differing traditions),
- "other backwards classes" (communities that were less discriminated against but still not quite at the top of the hierarchy), and
- "general" (none of the above, so mainly the upper three castes, so this category does not receive any benefits)
Politics has allowed powerful communities to gain beneficial statuses, of course (corruption being the foremost ruler of the country).
The scriptural support for casteism varies widely depending on who you speak to (as do most beliefs in Hinduism), with some saying that casteism is a fundamental part of the religion and culture and others saying that such discrimination is against the core tenets of the belief system. Most other religions on the subcontinent explicitly disallow casteism, however (though it continues even amongst their adherents as people naturally find ways to discriminate against each other).
Anyway, to summarize:
- Casteism isn't particularly separate from Hinduism (there are a lot of debates on this topic)
- Casteism is somewhat equivalent to racism in the US with its effects and the methods used to combat it
- Other religions explicitly disallow it but it continues