China's actions if hostilities flared with N. Korea are hardly irrelevant but they are not the main problem, nor are N. Korea's nukes. N. Korea has 12,000 artillery pieces, many of which can range Seoul, a place with around 25 million people living in it at population densities that make it nigh impossible for a shot not to kill at least several people. Even the most barely trained crew can line up a shot that will hit in that area and shove multiple shots out per minute. Several thousand artillery pieces firing are essentially dropping a nuke per volley, except nukes aren't as deadly in terms of raw explosive yield as a parallel artillery strike.
It isn't fear of China or a nuclear war that keeps us, or S. Korea on its own, from pounding N. Korea flat. S. Korea could kick the shit out N. Korea on its own. It is that even if everything goes perfectly with planning and implementing a first strike without them getting a whiff of it, you still need to kill 99% of their guns practically simultaneously just to have a hope of keeping your civilian death toll to 9/11 figures. Just to give an idea here, a lone artillery battery, just 6 guns, could do horrible things to any city in mere minutes, they've got 2000 times that many.
South Korea, or at least Seoul, may be screwed no matter what. If war is inevitable it really does not matter to them which side starts it: Either way, the first half hour would leave Seoul looking like Stalingrad ca. 1943. Again, MacArthur was right and Truman wrong (strategically, not legally,) and you know I would not say that unless I meant it, because it is about as pleasant as sawing off a limb.
It may come down to whether 1) China has the influence and desire to restrain North Korea forever and 2) South Korea knows that. However, that also assumes 1) China realizes its long term strategic goals are better served by contesting global hegemony by economic rather than military means and 2) North Korea does not decide nuclear weapons means it no longer need heed China.
Your Truman/MacArthur concession is also noted, FYI I'm not actually a fan of either them and I choose to view their personal conflict separately from their other achievements and failures with MacArthur as the lesser of two self-absorbed assholes though neither stepped over the moral event horizon IMO. I'm disinclined to trust history on that one to give a very neutral, accurate, and objective image of the situation.
Beyond diplomatic and long term factors China is essentially irrelevant to any realistic near-future open military conflict, which only comes in two flavors. A) We hit first and try to destroy as many of their guns as fast as possible while S. Korea tries to get as many of its people into basements and subways as fast as they can, B) they hit first and enraged SK and US forces curbstomp NK into the ground. China wouldn't be well-positioned strategically or politically to involve itself at that point, though God alone knows what would happen, precious fews of those scenarios would end well for China except standing on the sidelines jeering or cheering. They might not end well for us either but almost certainly worse for them and so in either absolute or relative terms China wouldn't have much to gain and would have much to lose if they chose to throw in.
- Albert Einstein
King of Cairhien 20-7-2
Chancellor of the Landsraad, Archduke of Is'Mod