I ask because recently I read a post about how Muslims conquered India due to most Indians not being able to participate in war due to being lower caste and thus unable to work in the army. I'm not sure if that's even true cause it sounds very counter-intuitive to have western armies did it.
There were lower Castes allowed under some Kings and most Kings didn't allow it but it wasn't the main reason for it . The main reasons were
The kingdoms were divided and did not help each other in times of war .
The Indian kingdoms used slow paced ,drugged elephants against fast moving cavalry of the enemy . The drugged elephants often trampled their own soldiers . The elephants often got scared of the Cannon sounds .
Better rounding up of the enemy tactics with cavalry .
Modern Canons and more use of gunpowder by the enemy .