Doesn't that leave between 1840ish and 1857 for any budding Afghani insurrection to coalesce against the Persians and Russians and be cultivated by Britain as a new proxy, or even British agents getting on the ground floor and trying to intrigue up an uprising themselves? I imagine the EIC would very much desire to "rectify" the circumstances of being forced to rely on a strong Indian partner who can actually collect on what is owned them. I have no idea how good/wildly incompetent such efforts would have been, but I think they would have been attempted.
Sure, such efforts might well still be attempted, even without the ability to project military power into the area (since that'd necessitate relying on the Sikh Empire to allow their troops free passage through its territory, as they did for the 1st and 2nd Anglo-Sikh Wars IOTL), but the Russians and their own agents would've been all over that too, and IMHO, they'd have the advantage over the British in that regard. Not to mention that any such budding Afghan insurrection, with the majority of Afghanistan's centers of population, trade and commerce already annexed, would be very feeble indeed.
Well, you certainly make an interesting case for the Sikh Empire as a buffer. However, that does leave how you envision these structural issues to be solved. It is not enough to have good leadership after all - how do you create a state that is capable of withstanding, solidly, the pressures that will be placed upon it as the 19th century continues? We can recall the situation of Siam, which was a vigorous and well-run kingdom with a cunning ruler, but its position between two major powers meant mostly that it was able to come out of the colonial games as a mere buffer state rather than being entirely annexed. Would this be the fate of a Sikh Empire, to be a buffer between Russia and Britain in a similar way as Iran, too large to be dismantled but too weak to stand on its own?
After all, as the 19th century continues it will be more difficult for the Sikh Empire to stand alone, even in a buffer situation, and if the Russian Empire and Britain were to come to some agreement this would be catastrophic for the Sikhs. And there remains the problem of governing a territory mostly non-Sikh, and creating a structure that is more akin to a modern state that can govern that structure. After all, we can look at Muhammad Ali's Egypt, which seemed to have all the preconditions to challenge Europe and was the first non-European state to attempt industralization and the construction of a modern bureaucracy - and we saw what happened to it.
If one looked at Egypt in 1835 it seemed to have all the conditions necessary to pose a significant challenge and rise, but by 1865 all these ambitions had turned to ashes in the mouth of the khedives. How do we avoid such early advantages for the Sikh Empire turning into a catastrophe by the late nineteenth century as imperial competition heats up? What are the conditions like in the Empire for the development of greater literacy, schooling, industry, the construction of a stronger and consistent bureaucracy, and the avoidance of the problem of a minority faith ruling over a majority which does not hold it? Especially if such tensions are exploited.
Well, that is the big question. Echoing the situations of Siam, or Persia, does seem like a likely potential scenario for the Sikh Empire in this instance. Or that of Egypt, if they're particularly unlucky. However, there are advantages for the Sikh Empire which could give it advantages as they head into the late nineteenth century, and imperial competition heats up. Chief among these would be the development of greater literacy, and schooling. One of the central tenets of the Sikh faith was universal literacy, with the Gurmukhi script created and standardized by the second Sikh Guru Angad Dev Ji for this specific purpose. And another central tenet of the Sikh faith is social security; the Sikh Empire effectively offered social security and public education to the masses via Sikh religious institutions. Every Sikh Gurdwara provides a free community kitchen, offering Langar to all visitors, regardless of religious, regional, cultural, racial, caste, or class affiliations. And in this era, the Sikh Gurdwaras were also public libraries of Punjabi literature, as well as schools in which children were taught not only religious studies, but a number of different subjects.
Under Maharajah Ranjit Singh, the Gurdwaras across the Empire were directly financed via the royal treasury, in a vaguely similar manner to the major Shinto shrines across Imperial Japan during the State Shinto period. Unlike with the Shinto shrines though, funding the Sikh Gurdwaras also served to finance a system of basic state socialism, in which state welfare, emergency housing and universal public education were all offered to the public directly through the Sikh Temples. And in the latter stages of Ranjit Singh's rein, in the late to mid 1830s, they'd begun to introduce the concept of compulsory education for children; resulting in what the East India Company themselves admitted was most likely one of the highest literacy rates in the world, so high that the British implemented a book-burning program to curb it and reduce literacy rates for fear of rebellion. However, this was grossly under-reported by most contemporary historians, for whom literacy in Gurmukhi and Punjabi didn't count, since they only considered Indians 'literate' if they were versed in Persian. And regarding 'the avoidance of the problem of a minority faith ruling over a majority which does not hold it', while they didn't necessarily have to be Sikh in order to access these services, people still had to follow Sikh customs in their places of worship, with this system enticing many to convert to Sikhism.
The Sikh Empire itself was only founded in 1801, less than forty years after this massive holocaust, and at the time it was established, it's estimated that the Sikh population had just about managed to recover to equal the number of people who'd been baptised into the Sikh faith on the day of the religion's inauguration on Vaisakhi 1699; i.r.o 300,000. And yet, by the time of Maharajah Ranjit Singh's death in 1839, less than forty years after this, the Sikhs' numbers had mushroomed to the extent where they comprised 17% of the total population of the Sikh Empire- which in turn equates to a total Sikh population of over 2 million. Considering the time frame involved, that's a pretty mind-blowing rate of religious conversion, especially when one considers that forced conversion was never a thing, and that the Sikh Empire reputedly had one of the most liberal attitudes towards religion of any contemporary nation in the world. Effectively, over this period, from the Sikh genocide up until the annexation of the Sikh Empire by the British, the Sikh population was increasing at a rate of 60% every single decade; and if this exponential rate of growth had continued under an enduring Sikh Empire, then even our expanded Sikh Empire ITTL would have been on course to have a Sikh majority population by the late nineteenth century. IMHO, when one takes this into consideration, it should certainly be deemed entirely reasonable for a stable and enduring Sikh Empire to have at least a Sikh plurality population by 1900. Would that be enough? Maybe.
And it's also worth that Sikhism itself ITTL may well be markedly different to Sikhism IOTL. For instance, since Hinduism emphasised the sanctity of cows, the Sikh Empire also universally imposed a ban on cow slaughter. Ranjit Singh willed the Koh-i-Noor diamond, which was under his possession, to Jagannath Temple in Puri, Odisha while on his deathbed in 1839 (though it would never be delivered to them). Ranjit Singh also did a great deal to finance the construction of Hindu temples, not only in his state, but also across British India. It was noted that the Sikhs made an effort not to offend the prejudices of Muslims, yet according to those Europeans who travelled through the Sikh Empire and gauged public opinion, "...though compared to the Afghans, the Sikhs were mild and exerted a protecting influence, yet no advantages could compensate to their Mohammedan subjects, the idea of subjection to infidels, and the prohibition to slay cows, and to repeat the azan, or 'summons to prayer'". Even IOTL, almost the entirety of the Hindu population of Sindh in 1900, comprising roughly 20% of its total population, as well as almost the entirety of its middle and upper class population, were Nanakpathis- and prior to the Akali-led initiative under British rule to apply stricter criteria, these were considered to be Sikhs, rather than Hindus.
Though it is also worth mentioning that, unlike their Hindu subjects, their Muslim subjects largely refused to utilize the educational services provided by the Gurdwaras, instead sticking with their own Islamic Madrassas. And this, in retrospect, can be interpreted as having most likely been the reason why the overwhelming majority of those who converted to Sikhism, under Sikh rule, converted from Hinduism, rather than from Islam. The Sikh Empire's religiously mandated, state-sponsored social security and universal public education system, the means through which it 'exerted a protecting influence', was also the primary instrument through which it initiated and converted its subjects to Sikhism- and proved remarkably successful in converting the majority of the local population which utilized these civic facilities to Sikhism within a single generation. However, its Muslim subjects were far more hesitant, resistant, and in some cases, openly hostile to them, refused to utilize them- and as such, while some of them did also convert, their rate of conversion was far slower, and more gradual.