North Korea does not want to be China's puppet state, which is why they're not satisfied with China's offer of protection and is instead insisting on developing nukes themselves. Once they obtain nukes and the ability to deliver them, they'll chart a more independent course, and all other actors in the region will adjust their stance toward NK accordingly.
As such, NK developing nukes is not a welcoming development from China's perspective, and in fact should be stopped at great cost if necessary.
Now, I agree that influence is preferred over control, which is why I believe that if war erupts over the peninsula, China should remove the NK leadership and its military, station troops in NK, but hand administrative control over the SK. Leave the mess to the South Koreans to handle, shirk the responsibility and build influence via assistance in rebuild instead.