Just what was it that gave the Europeans such a massive military edge over the world during the Age of Imperialism? Was it superior technology? If so, how come they humbled China? Was it superior doctrine? Was it superior training? More motivation? Just what was it that gave Europe the edge needed to dominate the world so thoroughly from 1830(ish)-1945?
I can talk more about India because that's what I'm more familiar with. China is a different situation with a different progression of events.
It was cumulative but right up til the 19th C it wasn't really about military technology.
First the need to venture further afield to trade, and then protect those trade routes gave Europeans the maritime capabilities to dominate Asian trade routes.
Then the financial system that developed due to the need to finance said ventures provided the underpinning for more complex governmental and corporate structures.
The wars of religion in the wake of the Reformation provided the groundwork for a military revolution.
In the end you see a situation like that in India in the late 18th C. Indian armies were technologically equivalent to the East India Company's one but the Company's financies, logistics and organisation allowed it to become a power broker, and it's military organisation allowed it to take on and beat technologically equivalent, but organizationally inferior Indian armies. Line infantry was really the key- European style line infantry had the discipline to move forward under fire and take ground. Thus, a lot of battles between Indians and the British tended to see the Indian side pinning their hopes on artillery (Indian princely armies routinely fielded artillery heavier and more copious than equivalent European forces) but not having the drilled infantry to screen that artillery whereas the Company troops had the discipline to advance under fire.
Indian Princes were eager to hire European officers as mercenaries, and towards the late 18th C you see the beginnings of Indian armies drilled in the European style (such as Tippoo Sultan's Mysorean army) but this was too late as the British were able to dominate the sea routes* and cut all the other Europeans (who Indian rulers might have cut deals with) out of the subcontinent. Thus, in the short run you either cut a deal with the British or got beaten by them and your local rivals who did cut a deal with them. The end result,, a century late in the mid 19th C was the British Raj.
The same pretty much happened in SE Asia, although there the British never achieved total dominance which is why you see much more of a patchwork of spheres of influence, with the Thais notably being able to avoid colonisation altogether by playing off Britain against France and vice versa. In a situation where Britain was unable to achieve total maritime dominance and other European powers retained spheres in India, you'd likely see a lot less direct dominance (and even IOTL about 50% of the Indian subcontinent was technically not directly ruled by the Raj) and more of a patchwork of states in varying degrees of independence and domination.
*This is really important- the British dominance of the sea routes which occurred as a result of the various French Wars of the late 18th C gave them the ability to monopolise the balance of power. Before British naval dominance no European power was really able to dominate much more than specific ports and trading concessions. After that the UK was able to be the only kigmaker in town and dominated the subcontinent.