I think that the Qing dynasty was probably too handicapped by the simmering resentment of the Han majority to endure that long. For a traditional empire to have a better chance to survive, the Qing would either have be replaced by an ethnically Han dynasty (the earlier, the better its chances) or they would have to relinquish enough of their cherished lineage roots that they can shed their image as outsiders. The first scenario is unlikely given the solidity of Qing rule throughout most of the dynasty's existence and the second is unlikely given their conservatism and hubris. For the second to happen, we need someone who is both a radical reformer and one of a far stronger character and conviction than any of the decadent and ineffectual stock the Qing produced after Qianlong, who was, by the way, a Manchu through and through. I can see no situation in which an emperor has both the strength to radically alter things while simultaneously being willing to throw out his ancestors' hard fought dynasty. Besides being an illogical act, it would probably get him killed.
A surviving Ming dynasty which resisted Manchu takeover would not necessarily have provided better leadership either, and that's assuming it even made it to the 20th century. Though a dynasty of such longevity and with a lack of association with Barbarian conquest could have helped it hang on, this centuries old Ming dynasty might still have limited staying power if the imperial system proved unable to adapt to changing circumstances and defend the country from external threats (and with an even longer imperial tradition, the Ming might have been a dinosaur even more stale and hard to reform than the Qing).
As for the Taiping, their empire was doomed by an absurd theology dreamt up, literally, by a delusional lunatic. Even though the proposed heavenly kingdom offered its share of cheerful reformism, I think the Taiping movement was a dead end that would ultimately lead not to modernization but to a deluge of fanaticism, destruction and death; its success would be followed by the imposition of a regime that might resemble an unsavory fusion of Mao's cultural revolution and ISIS. Indeed, given their behavior's trajectory, I think that a triumphant Taiping would have very likely imposed an extremely harsh and cruel dictatorship (and not an empire in the traditional sense) over the nation as soon as they had won the war and begun to consolidate their power. With the concern for military defeat removed, a movement with the beliefs and goals of the Taiping would be sure to turn on its allies quickly and those who did not sufficiently yield to the dogma would soon find themselves in a situation not unlike that which the Iranian communists did after the OTL 1979 revolution. Once their cult's intensely heretical nature became apparent, the short-lived myth of an englightened Taiping China disappeared; Europeans might do business with it but would continue to find little to like in a Taiping China. Indeed, I think that the country could have had a grim future in this scenario.
Yuan Shikai might have been able to put himself in as emperor if everything went his way, yes, but he was probably much too late to found a new empire with any real credibility; justifying an imperial tradition founded by a strongman in the 1910's is much harder in the face of emerging democratic movements around the world and in the context of the failure of the last imperial system to stand up to foreign encroachment for nearly 100 disgraceful years. I think it would be likely to devolve into either dictatorship or civil war upon Shikai's death. Since he only lived until 1916 and died of kidney failure, any reign of his would require an exceptional successor in short order.