Can factors like divisions in Indian society (caste, religion, nationality and ethnicity) or a British military/technology advantage be considered important? Are there any other factors that I haven't considered?
The shortest answer is "very significant."
However, I doubt that's what you were looking for when you asked, so I'll expand a little.
The first, and most important, thing to remember when looking at British rule in India is that, much like the rest of the Empire, it was not governed in a single style, but by a combination of direct and indirect rule.
The Transition from Company Rule to Raj
The big change after the Indian/Sepoy Rebellion/Mutiny was the dissolution of the East India Company, and the subsequent establishment of the British Raj. Company rule had been a legal grey area in which the EIC tended to comport itself as one of the local states instead of the extension of any foreign power, best exemplified by the fact that the EIC continued to engage in the legal fiction that its rule derived from a grant by the Mughal Emperor in Delhi. [1] After the Rebellion, the Company was thoroughly discredited, and the British removed the arm's length they had previously held with the Indian Empire; the first steps being the removal of the Mughal Emperor and the placement of the Crown as sovereign in the subcontinent.
In Britain, this resulted in the creation of the India Office, giving India its own Secretary of State in Whitehall. The Governor-General became less of a head of state and more what one would expect from a Governor-General; chief administrator in charge of the appointment of Lieutenant Governors and administrators, while foreign policy came from above. The Raj however, did grant the Governor-General new responsibility as the Queen's representative to the Princely States, which is why you may be more familiar with the name of the office as Viceroy of India.
The Princely States were the real indirect rule part of the equation in British India. These were large landholders who had been linked to the Company before the Rebellion, and whose status as recognised "states" had been made official in its aftermath by their subordination to the Crown. The Viceroy was the Crown's representative to the larger ones, and the smaller ones were run by offices with Viceroy-appointed representatives.
The representatives (commonly known as residents) would engage in a delicate game of awarding or withholding honours, titles, encouraging or discouraging the Prince's opponents etc. This intrigue happened with the tacit acknowledgment by all involved that, should the resident feel strongly enough that he is not being listened to, and be able to convince his superiors of the necessity of such action, the entire thing could be brought down by the British through force.
Thus in the Princely States, almost all was handled by the local elites on behalf of the British, on the basis of treaties signed in the Rebellion. Now, what about areas ruled more directly?
The Indian Civil Service, Local Elites, and the Western Educated Indian
The statistic that should tell you most about how much cooperation from local elites was needed and demanded by the British in India is the size of the Indian Civil Service. This group, known as the Civilians, was the holder of all the highest senior appointments in British India. It was Britain's 'ruling class' on the subcontinent, and it numbered only about a thousand men.
Sure, there were the some 70,000 officers and enlisted men of the India garrison, and hundreds in the Indian Imperial Police [2], but when it came to government beyond quashing rebellion, the day-to-day of administration, these 1,000 men lorded over a subcontinent that in 1891 contained ~287 million people. To put it simply, almost everything thus relied on the cooperation of the local elites, often enticed with honours and small titles that would show government favour and lend them more standing in the villages. Village-level appointments were usually in the hands of said local elites. In some cases, a sufficiently powerful local elite might even end up controlling the appointments of the Civilian's own office.
Now, the Western Educated Indian that emerged as India was to be industrialized; this group was what formed the eventual intellectual base for Indian Independence. They were to become Indian members of the ICS; to live up to the British rhetoric of a civilizing mission. The Civilians' reaction to them reshaped India and Indian society.
In order to head off the claims to rule of the English-speaking, educated Indians, the ICS produced an avalanche of documentation that presented India as an unfathomably diverse entity, divided by caste, religion, race, language, region. You may notice this as the modern view of India, and the Civilians used it as the springboard for their ridicule of a small minority of English-speaking Indians hoping to govern for all of India. To further this fragmentation while ostensibly giving more self-determination, they opened up provincial councils for Indians, but kept a mix of appointees and elected members, all in the interest of "protecting" the diverse Indian makeup of society. And they jealously kept to themselves those high appointments that constituted the base of their position as a ruling class.
The Indian Army
Forewarning, this section will be short.
British rule was, of course, backed at its very core by force of arms. Before the Raj, this had been the Comapny's armies arrayed against those of any potential challenger. After 1857 though, when the Company Army was almost beaten by armed rebellion, the British comprehensively disarmed India. And from then on, the British Army proper would always maintain a presence on the subcontinent.
The 70,000 British officers and enlisted men mentioned earlier however, were only the European centre of a massive Indian army that, since the Rebellion at least, was deliberately recruited from the minorities of the subcontinent; divide and conquer. This monopoly on armed force was what the ICS and Viceroy could back themselves with if it seemed that a princely state or a local elite were about to turn against their wishes.
[1] - In fact, until 1835, Company money was issued bearing the Emperor's head.
[2] - George Orwell served as part of the IIP in Burma during the 1920s. I highly recommend Burmese Days as a good read, if not necessarily as a perfect reconstruction of British rule in India.
Sources
Darwin, John, The Empire Project: The Rise and Fall of the British World-System 1830-1970, (Cambridge, 2010)
Darwin, John, Unfinished Empire: The Global Expansion of Britain, (London, 2013)
Peers, Douglas M., and Gooptu, Nandini (eds.), India and the British Empire, (Oxford, 2012)