US is attempting to regime change NK. If a CIA-backed general get his hands on a few nukes, can China send in troops to help the Kims?
China would have people already sitting on the inside to take care of such a danger?
Not to mention, how much do we even know about how nukes in NK are controlled? Which people need to be consulted before a nuke can be activated? Given that it essentially operates what seems to be copies of various older Chinese missiles up to the point of DF5, who would have provided such a sketch, and how would you know that the providers don't have some sort of say on how the missiles can be loaded?
Relation between NK and China is simple. NK will keep building weapons so they can reunify the south once shooting in Asia starts. China would prefer to postpone the shooting as much as possible, but in light of US aggression, it can only postpone while preparing for conflict.
China's gamble is that NK will become a changed society once it takes over the south, which would require direct Chinese action. NK's gamble is that building everything into military will end up giving them the chance to take the south.
And why would the Kims not follow whatever joint plans both countries would have on reinventing Korea once they've achieved unification? Korea isn't gonna remain a stratocracy forever, not once there's no threat, no sanctions, no need for war in Asia.
Historically, Korea has many times been well controlled vassals of China, or even directly ruled from the central government. The Kim family and the North Korean stratocracy is an echo of the border warlords which China once created, strongmen given carte blanche to shape their own society as they fit, in exchange for loyalty and raising an army able to serve the central government.
Is that as ideal as there existing no US aggression at all and therefore no need to create military dependencies? No. But China has been under threat of being invaded by the largest military on earth for as long as NK existed. And NK helps insure against it.