Essentially the reason that Britain took almost all of India boils down to her control of the seas- looking at the 18th C situation, the SOP was for European powers to try to cultivate client rulers and to use their forces to tip the balance. At this point in time there wasn't much of a tech advantage, so to speak. The average Indian army was using the same weapons as the average army back in Europe. The differences were mainly doctrinal- Indian commanders weren't familiar with how combined arms (in a crude sense) worked (i.e. using infantry, cavalry and artillery together). The tendency was for Indian rulers to invest a lot in artillery (I've read that some Indian state armies used far more cannon proportionately than did European armies). This meant that the Europeans could use their drilled and relatively disciplined sepoy infantry to help tip the balance since drilled infantry could be relied upon to advance in the face of artillery when necessary.
With the French Revolution and Napoleonic Wars, however, Britain managed to achieve total dominance of the seas. French clients in India were thus at a disadvantage against British clients who could still depend on Company infantry to come in and help.
This is, of course, a gross oversimplification but it does sort of sum up the military situation in late 18th C India.
An interesting observation was that some Indian rulers were beginning to raise their own properly drilled infantry- the Tipoo Sultan had a royal guard drilled and trained by French mercenary officers and IIRC some other rulers had Portuguese training officers too. However, these practices had only developed to the point where said drilled troops were being used as elite guards units. The theory and practice of using drilled European-style infantry as the main arm of battle hadn't quite caught on by the time the British were able to cut out the other European states. Non-British clients were quickly subdued and the British clients gladly accepted vassal status, paving the way for the future Raj.
IMO given 20 more years, European infantry training practices would have become institutional in Indian armies- the soldiers serving in those elite units of the 1790s would have been the sergeants training the entire army in the 1800s, giving them the ability to operate as effectively as Company infantry. European doctrine, once standard practice in India would have effectively neutralised European control of the Indian balance of power. Mysore, for example, with a fully Europeanised army would have easily been able to sweep aside the numerically inferior British (or French etc) forces in South India. The same would have been true for any other Indian state. IOTL, however, they didn't get that extra generation- Britain cut out France and defeated the largely unupdated Indian armies, elite drilled guards units being not enough to fight entire armies of drilled infantry. In an ATL, this would be interesting to explore. One suspects that Mysore would dominate South India.
It should be noted that in my Vijayanagar TL, I had something like this happen two hundred years earlier with the Empire of Vijayanagar adopting Portuguese pike and shot tactical doctrine enabling it to operate with a military advantage against the Deccan sultanates and against European forces of the time.