Summary of some other posts I've made. It's a bit of a rush job given the urgency, but it should cover all pertinent points.
---
China's course of action very much depends on what the US does, and if they trigger a war between South Korea and North Korea.
But China should make it clear to Fatty Kim that no matter what happens, he and his family always have the option of a quick exit to China and a comfortable exile. It keeps China from being targeted by North Korean nukes and Kim firing off his nukes in desperation at Korea/Japan/USA.
China has publicly promised to support Kim if he freezes the nuclear programme. Since he already has nukes, it is simply unrealistic for him to give up what he already has, so the best scenario is if the nuclear/missile programme is frozen (like Iran) and North Korea's nuclear arsenal remains at its current limited size.
That limited arsenal still comprises 20-odd warheads with the range to reach Korea, Japan and Hawaii - which should be sufficient to deter and be sufficient comfort to Kim.
But if Kim doesn't agree to freezing the programme, I fear that Trump would be willing to unilaterally trigger a full-scale war between North and South Korea, knowing that the vast bulk of the fighting and suffering will be borne by the Koreans, then by China/Japan, rather than by the USA.
It may well be better to remove North Korea now, rather than wait until North Korea has ICBMs that can reach Los Angeles.
And once the fighting starts, he knows South Korea has no choice but to finish North Korea off.
As for China, well, North Korea has ignored China's offer of protection/support in exchange for a freeze of their nuclear programme.
So if North Korea and South Korea start fighting, I think China should decline to intervene, but if Kim starts offering his full cooperation, China should offer support to keep him in control and maintain order or offer a comfortable exile in China.
Eventually we'll get to a scenario where China sends the army into North Korea (with minimal opposition in the event of securing Kim's approval or in a NK collapse) to:
a) create a buffer zone
b) secure nuclear materials from an accident
c) provide humanitarian relief efforts
Then China simply offers a deal to South Korea. China will remove its soldiers and support the reunification of the Korean peninsula if:
a) Korea becomes neutral, the US-ROK security alliance is terminated and all US troops leave Korea.
b) China will fund the reconstruction of North Korea. China easily has the spare financial and industrial capacity to do this, whilst a fully intact South Korea does not.
c) China will also fund the reconstruction of Seoul which contains half the population and industry of South Korea, but was devastated by North Korea's 11,000 artillery pieces and rocket launchers. But if North Korea has used nukes or chemical weapons, the 20million+ people in Seoul may no longer be alive.
Otherwise Chinese troops will occupy a North Korean buffer zone indefinitely in the name of maintaining order and humanitarian purposes.
And the only way they will leave involuntarily is if the entire Chinese army is defeated in a war, which is not going to happen given US reluctance to go to war with China and a South Korea which is likely to be already hugely traumatised.
Thus the termination of the US-ROK security alliance becomes a choice for Korea rather than abandonment by the USA. Based on previous comments, Trump would probably welcome the return of US troops from Korea and the possibility of fighting a land war against China.
It's very difficult to imagine South Korea choosing to maintain the US alliance in such a situation, as it means the reunification of Korea doesn't happen and Korea can't afford to rebuild by itself anyway. Plus a hostile China would surely be waging economic warfare against South Korea and actively supporting North Korean elements in sabotaging reunification efforts.
In the aftermath, reconstruction of North Korea is going to take at least a decade, and in that time, one would hope South Korea and China develop better relations during reconstruction.
Remember that at a growth rate of 6.5%, in 11 years, the Chinese economy (and presumably influence) will be twice what it is today.
Given how the South Korean economy is already so intertwined with that of a much larger China - China has a lot of economic leverage if required. It will be very difficult for South Korea to avoid falling into China's economic orbit, particularly since Korea and Dongbei are close enough to form a single economic zone with a huge increase in overland trade and movement. From Seoul to Shenyang, it is only 2 hours on a high speed train or 4hours for a truck from factory to a shop.
And if a unified Korea leans towards China, we can expect Korean companies to be treated more favourably in China. Even before the THAAD disagreement, the South Korean electric battery companies were lumped together with the Japanese as targets for Chinese industrial policy as an example. And remember that South Korea and Japan are fierce commercial competitors, so the Korean companies would relish any advantage over their Japanese rivals.
And yes, there is still a risk that a unified Korea may turn to the US in the future, but remember what happened the last time South Korea had a security alliance with the USA.
The Trump administration launched an attack on North Korea (over South Korean protests), and entrapped South Korea into an unwanted war with North Korea.
In the future, suppose China and the USA end up in conflict over Taiwan, the South China Sea or the East China Sea with Japan? Will Korea be trapped into fighting an unwanted war on America's behalf?
---
Some also argue that it is in China's interest to back North Korea fully, but this is most definitely the wrong course of action.
Kim allowing the Chinese army into North Korea means he accepts Chinese control over him, which is completely at odds with the assassination of his brother who was under Chinese protection. And why has North Korea been adamant about obtaining nukes? To prevent anyone dictating regime change or control over North Korea and the Kim dynasty.
So he will only invite in China once he feels he has no choice.
But let's run with the scenario where China backs North Korea to the utmost, and sends in the Chinese army with Kim's consent. This means Kim now has the opportunity of a lifetime to deliberately start a war and have Chinese soldiers dying (instead of North Korean soldiers) to conquer South Korea. I think he would almost certainly take this opportunity, given his previous actions.
And a Korea unified under the control of Kim is far more dangerous, unpredictable and poorer than if South Korea was in charge.
Plus China will end up in a war with the USA which is not in China's interest, as it may very well turn nuclear and will certainly derail China's economic plans.
Remember that at a growth rate of 6.5%, in 11 years, the Chinese economy will be twice what it is today and should be reflected in wages for the peasantry.
So at the end of the day, what is the best course of action for the people living in China, North Korea and South Korea?