All China has to do, imo, is to continue doing what it has been doing, and not take the bait of war thrown by the Americans. Americans love war. They are good at destroying, but not very good at developing without it. Restrict their ability to wage war globally and they will crumble. Their entire economy is based on the war machine and the resultant chaos.
Just because Americans love war doesn’t necessarily make them the best at fighting wars. Not against peers and near-peers who can actually fight back. They are a predatory empire that derived its power and wealth from pillaging and slavery and they never really evolved past that level, which is why they are addicted to war. But only against hopelessly outmatch victims who cannot fight back and hurt them. As soon as they encounter real resistance they cut and run because Americans are actually not that good at fighting real wars. Their only real experience fighting a near peer real war was way back in WWII, when they jumped in late on the winning side. They are for sure no pushover, but other than their industrial production capabilities, there wasn’t really anything all that outstanding about their actual war fighting performance in WWII.
The Chinese don’t like wars, because throughout history they have fought a lot of total wars against some of the most infamous warrior cultures in human history that lives for war, and knows the true costs of such wars. So much so that when they are forced to fight wars, they don’t fuck around and generally end civilisations that love wars so much to stop having to keep fighting wars against them. In that sense, the Chinese are a lot more like the ancient Romans that the Americans loves to ape, far more so than the Americans themselves.
What I'm not sure of is whether the non-interference policy of China is good or bad. Ideally, it is better not to interfere in foreign politics. But it just so happens that China's enemies interfere everywhere and turn those countries into mini obstacles for China. Take Pakistan for example - despite having China as it's closest ally, it is infested with American and European interference in every sector and faction. Have you noticed: whenever a Pakistani leader is in trouble, they run to and seek assistance from US/UK, but not China?
China’s non-intervention policy is rooted in deep pragmatism. China doesn’t want to be forced to prop up horrid dictators and hopeless idiots against their own peoples.
If you are at risk of being overthrown by your own people, the amount of resources China, or indeed any foreign power, would need to invest to prop you up is going to be unsustainable in the medium term even. Just look at America’s long and growing list of such failed misadventures for examples.
China’s investments are with the people of a country, not a particular leader. Take your Pakistan example, ordinary Pakistanis, irrespective of their political preferences and beliefs, are almost universally passionately friendly towards China. That is how you secure long term sustainable friendly relations with a whole nation and people rather than short term deals with a problematic individual who’s own choices and behaviour makes them an enemy of their own people and thus destined to fall eventually.
This policy is also a test of nations and peoples to see which are worthy of Chinese investment. If a whole people are delusional beyond redemption, it’s better to leave such idiots in the opposing camp where they will be more useful to China, like the Italians were to Nazi Germany.