I've always found it rather odd that when it comes to the caste system, people tend to paint incredibly simplistic narratives of how and why it came to exist and continues to exist in India. It is an incredibly complicated amalgamation of societal developments over the course of millennia on the subcontinent and trivializing it as either purely social or purely religious/doctrinal in origin, or claiming it is an intrinsic and necessary part of "Hinduism" or Indian culture is rather myopic and dishonest.
A major misconception I've seen circulated in this thread is the attribution of the caste system to the Manusmriti. To those inculcated in cultures where Abrahamic religions are the norm, it is natural to think of a holy text as subsequently establishing the societal and religious standards in a given society. This model is extremely simplistic when analyzing the caste system in relation to the Manusmriti since the latter, far from being a foundational text, was merely a reflection of trends (religious or otherwise) that had developed organically and were already incumbent in Indian society. Even then, it was a brahmanical conception of the "ideal" society and there is little evidence (to my knowledge) to suggest it was actually used to formulate large scale laws and societal norms on any meaningful level. Even if the average Hindu throughout Indian history was aware of this text, I would be skeptical of its import as it would have merely affirmed the existing feudal (i.e. varna/jati) structures which constituted daily vocational life in the subcontinent.
Related to the aforementioned conception of the caste system are issues surrounding the nature of "Hinduism". Yet again, it is tempting to treat Hinduism as spawning from a central corpus of text(s) (usually deemed to be the Vedas) and god(s) but this model suffers from similar problems as above. For one, it neglects the powerful processes of Aryanization and Sanskritization that took place throughout Indian history and the plurality of regional cultural, societal, and religious norms it spawned. Sometimes these differences are enough to constitute new religions if such differences are calibrated relative to more ossified religions like Christianity and Islam, since not even gods or scriptures are necessarily common among different denominations. More importantly, it ignores the variety of supplementary works, movements, and philosophical sects within "Hinduism" that developed precisely in response to brahamanical heirarchy and ritualism and have played pivotal roles in Indian culture. For instance, there are the schools of Indian philosophy (Vedanta, logic, atomism, yoga, samkhya, etc), the sramana movements in ancient India (which was partly responsible for spawning Buddhism and Jainism), the Bhakti movement, and so on. These more philosophical strains of thought are just as important (if not more important in my opinion) to understanding the nature of Hinduism as the more readily apparent ritualistic and devotional aspects of "popular" Hindusim.
I mention both these factors because they're vital to understanding the future role of the caste system and Hinduism in India. The caste system of today is often a proxy for very real socio-economic differences among different classes and groups in Indian society (as evinced by the fact that even converts out of Hinduism can still face caste-based discrimination). As India continues on its path of rapid economic development and becomes less rural and more urban/suburban, I am optimistic that traditional social barriers will break down, people of different castes will mingle, and Indian society will ultimately morph for the better. I do not think this bodes any ill for Hinduism in lieu of what I mentioned above regarding the sheer diversity of Hindu thought and practice, and the historical precedent that exists self-criticism within the religion. Even on a societal level, there are few educated Hindus who think of the caste system as a positive aspect of Indian society. On the contrary, you will find that many are ashamed of it and are all too willing to jettison it and whatever associations to Hinduism it has.