This is a fascinating question that I've considered looking into myself before, as the English-language scholarship specifically pertaining to the flintlock in China is decidedly limited. I can, however, at best work with what material that I can find on flintlocks under the Qing, and offer the answer that extant scholarship can provide. Speaking specifically of the Qing, there are three broad and interrelated angles from which to tackle this. To summarise as follows, they would be:
We will tackle each in turn.
One argument for why the Qing may not have adopted the flintlock is a simple lack of perceived necessity. As argued by Tonio Andrade in The Gunpowder Age, after the final victory over the Zunghars in 1757-8, the Qing would not be faced with a substantial military threat from a power with technological superiority until war with the British broke out in 1839. Andrade does not assert that there was no warfare in this period – indeed, the immensely destructive White Lotus Revolt happened slap bang in the middle, in 1796-1806(ish). But even with the issue narrowed to 'states with superior technology', the theory can have a few holes poked in it, not necessarily fatally but still so far as to require some further nuancing.
Firstly, the war with the Zunghars had not been one in which the Qing had been faced with a markedly technologically superior opponent – for instance, the Zunghars had basically no artillery, yet the Qing still invested efforts into improving theirs. Andrade seems to have misread or over-extended Perdue's argument in China Marches West (specifically pp. 526-7, which he cites), as Perdue's argument is that state capacity was expanded by the logistical demands of the Zunghar wars, not that military technology was improved to meet their tactical needs. Secondly, the Qing continued to use their old sources of scientific expertise, the Jesuit missionaries, to provide assistance with metallurgy and ballistics for their artillery in later campaigns: the Jesuit Felix da Rocha was tasked with casting siege mortars and providing ballistic data during the Second Jinchuan War, in which Qing forces had to reduce fortified stone towers in mountainous terrain. Thirdly, the Qing did not absorb the viability of flintlocks from the Burmese campaigns of the 1770s, in which several Qing armies were destroyed by attrition and guerrilla warfare, but where they did come to blows with flintlock-armed Burmese.
While there is some merit to the argument that the Qing's military innovation was stifled by continuous peace, there are just too many problems to make it a primary explanatory factor. The Zunghar wars were ultimately just the most substantial of a vast number of frontier conflicts against mostly technologically comparable powers, and one which demanded much of the state's attention, but not the commitment of all of its armies. The Qianlong Emperor would not treat his later wars with the Burmese, Nepalese, Jinchuan, or Vietnamese as being of lesser status relative to the Zunghar campaigns in his early reign, so it is hard to see why one particular set of earlier conflicts, conceptualised in comparable terms to later ones, should be seen as so substantively different.
An argument that Andrade doesn't highlight particularly hard for small arms, but which may nevertheless play a role, is the problem of technological replication. Qing attempts at reproducing British artillery during the Opium War were only of limited success, and the most infamous case is of a gun with a replica elevation screw cast directly on the barrel as a single piece, rendering it utterly useless. Although I cannot find a source that suggests that there were issues with the flintlock mechanism that prevented replication, I would suggest that it may be plausible. The mechanics of a flintlock are a stretch more complex than a matchlock, as a matchlock only requires, at minimum, a simple lever to lower the slow-match onto the pan, whereas a flintlock requires a springloaded mechanism to give the flint enough momentum to create enough sparks when hitting the steel to ignite the powder in the pan. If Qing cannon-casters in the 1840s were having trouble figuring out an elevation screw, it's possible that they may also have simply been unable to effectively replicate the springloaded mechanism required for flintlocks. This must, however, remain speculative until or unless some direct evidence in this area can be brought to light.
This obviously covers a whole host of ideas, but I want to home in on one aspect of Qing firearms use that comes up very briefly when it does, but which is notable, and that is the possibility that the Qing organised their firearms allocation hierarchically, such that flintlocks were a thing that were, very explicitly, not to be mass-produced. Flintlock guns, described as 'self-firing' due to their lack of an open flame, were not uncommon as diplomatic gifts: the Qing received them from a Portuguese embassy in 1753, and the British Macartney Embassy presented some in 1798; a French-made musket was used by the imperial prince Mianning (later the Daoguang Emperor) during the Eight Trigram sect's attack on the Forbidden City in 1813. So the Qing definitely did use some flintlocks which were maintained in the imperial household. As such, it is plausible that flintlock muskets were seen as some form of status object which it would be improper to popularise.
In addition, there is evidence to suggest that firearms were specifically monopolised in the Banner armies for most of the early Qing period, and from explicit pronouncements to the effect it is known that matchlocks were only officially permitted in the Green Standard Army beginning in the reign of the Yongzheng Emperor (r. 1722-35). We also know that the manufacture of gunpowder weapons was by and large directly monitored by the state. It is quite plausible, then, that the Qing's concern with ensuring political control of Han Chinese military manpower quite directly prevented the popularisation of the most powerful weapons available, which were to be retained in the trustworthy hands of the Manchu-dominated Bannermen.
That does open the question of why flintlocks did not become more standard for Bannermen, though, and that is a question that remains open to discussion. If we were to continue to operate within the notion of a stratified distribution of weapons, then we might suggest that the imperial household held the best weapons (i.e. flintlocks), the metropolitan Banners had the next grade (highest-quality matchlocks), followed by the provincial Banners and finally the Green Standard Army. But why the Qing might not have produced lower-quality domestic flintlocks for Banner troops and retained the high-quality foreign-made arms in the imperial household would not be explained by that.
So, as can be seen, there is no firm answer to your question. The idea that there was reduction in matters of perceived military necessity is oversimplified at best and cannot be sufficient as an explanation, but there is a grain of truth to the notion that the Qing were not frequently confronted with sufficiently powerful enemies to make a concerted effort at military upgrading particularly appealing, despite full awareness of the technology they could be using. There is, as yet, no firm evidence to suggest that attempts at the replication of flintlock small arms were made, but hampered by a lack of domestic expertise, although it would fit the evidence we have for Qing artillery. And while there is an argument to be made that flintlocks could be understood as a high-status weapon reserved for imperial use, there remains the question of why they were not broadened to Manchu use. All these explanations are to some extent viable, but have some notable limitations, and I can do no more than to present both the things going for them, and what goes against.