Absolutely. The caste system was seen as an excellent means of subjugation and there was no way of deposing Brahmins of their privileged status without unravelling Hinduism itself. Islam, Christianity and other religions offered a way out but again, Brahmin classes opposed this attempt to erode their power base. Why do you think hindutva lumps "abrahamic" faiths together to save time these days when listing "hinduphobic" forces?
If not the mughals, then the Aryans or the Brahmins or the British would have - and in fact did - exploit the caste system.
The stupidest thing about modern Indian citizens who bash on behalf of Modi is that they routinely criticise mughals for doing exactly what Brahmins have done and continue to do. Ultimately, this should come as no shock, since Brahmins and northern Indians in general came from Aryan invaders.