I don't see the CCP regime's stability being threatened at any point in the near future (Xi Jinping himself, who knows, but the guy's amassed more power than any leader since Deng Xiaoping, so things would have to go very wrong, very quickly) just because quite literally everything the CCP does is calculated to help preserve the regime. That includes everything from foreign policy to education to ethnic minorities to urban planning, etc etc. These guys are very good at preventing any sort of cross-class, cross-platform uprising or discontent, and when even a hint of that appears around the corner, they move to crush it.
It is true that the CCP's legitimacy was repaired after the Cultural Revolution by a booming economy, but they've taken steps to try and 'diversify', if that makes sense. The rise in nationalistic discourse (a lot of which is actually propagated by the PLA) and the growing blur between the idea of a Chinese state and the Party-state is no coincidence. I mean yeah, it is hard to say how nationalistic or loyal people are going to be in the face of a massive economic disaster, but I wouldn't just assume that the PLA is going to swoop in and side with some populist uprising. If anything, it'll splinter, and the country would be thrown into a second round of the CR.
I suspect the real problem that faces the CCP is just sheer demographics. Xi and his predecessors have done an alright job at actually bridging the divide between the interior and the coastal provinces (places like Anhui and the West tend to be outliers in this, granted) but the real divide is now between the urban and the rural. And, worst yet, is the divide between the people with rural hukou versus an urban one. There have been a couple hints that the government is just going to completely abolish the household registration system, which would mean a huge expansion of the relatively robust urban welfare system - but the problem is that would quickly become unsustainable, just because in about 15-20 years all those young, productive workers that fuelled the country from the 80s onwards will start to retire, and there won't be nearly enough people to replace them.
Ultimately though the Party can't outrun its people's grievances forever...but they are very good at co-opting dissent and enacting pretty impressive reforms. I dunno that it would be enough to actually save the one party state but I guess only time can tell.