Strong trading ties doesn't stop war. This is one of the largest lessons of WWI, and why an isolationist leader of the US is terrifying. It's sold as putting America first, but its scarily similar to the mad dash for guaranteed access to necessary resources before WWII.
Also, understand that the US has the backing (and mutual defect agreements) of South Korea, Japan, and NATO, and India would possibly join in a conflict against China as well. China wouldn't want a US backed state on its doorstep, but it would not want war against the US significantly more.
Mutual defense agreements don't matter if the US invades North Korea, the US is not the defensive party in the war. And it's easy to say that all of these sides would back the US now, an aggressive war in the region could change a lot of alliances.
Invading North Korea is not a sane option for the US unless China consents. The best case scenario sees China allowing it while preparing for a future conflict, and all out war is very possible.