Bmao, your points are good, and indeed sending US ground troops into China would have been a trap. However, once the UN troops have reached and fortified the Yalu, Red China has basically lost the war. Mao can't realistically go on with the war forever. He has not the means to wage a guerrilla war in Korea from Manchuria, and in a conventional war, the UN can keep on massacrating inferior-quality Chinese troops and smashing Chinese industrial and logistic potential with air and artillery power, until the PRC is without any more decent conventional troops. Or they can simply threat to smash China into the Stone Age with a dozen well-placed nukes if they don't give up Korea. Stalin won't choose WWIII to save Mao since that would be suicide: in 1950 the US had 369 nukes vs. URSS' 5, in 1951 the US had 640 vs. URSS' 25. The US had the means to wipe out the Red Army and the Soviet economy to oblivion, with at worst losing only an handful of armies or cities in the Western camp, if the Soviet second strike got really lucky in the death throes of the Soviet state, which is rather doubtful.
In recogntion of your good points, I change the TL as follows:
Truman and MacArthur sent warnings through covert diplomatic channels that the UN forces would unleash "total destruction" of China if a truce that would leave Korea united and safe from Communist aggression would not be established once they had reached and consolidated positions on the whole Korean border. It was not explictly stated, but it was implied that this would involve nuclear bombing of mainland China. By October, the UN forces had reached and consolidated positions on the whole Yalu river portion of the Korean border, up to Hyesanjin, and were pressing on Chongjin. Truce talks were resumed. The UN command and the USA government were stern that offensive operation would not cease until the whole Korean territory was cleared of Communist presence. Bombing of Manchuria targets was intensified. On November 12, the outskirts of Chongjin were reached and the Communist Chinese command agreed to pull their troops out of Korea. On November 27, 1951 an armistice between the UN and the Chinese Communists was signed. The UN and the USA had won a decisive victory in the Korean War.
Mao has the armies to keep throwing at the US for a while.
Here's what might happen though. Mao might decide to employ some psychological warfare by sending unarmed civilians across the Yalu river with peasant tools, putting a real moral dillemma on the UN troops. Mao had millions upon millions of peasants that he didn't care about throwing away, many of whom he was actually keen to be rid of, such as the remnants of the 'kulak' class, and this would be used basically as 'penal batallions'. Thus saving Mao his combat ready troops.
Here is where I will agree with you though. In this scenario, it'll have to take the US threatening to use nukes on China for Mao to back down. Or it may in fact take the UN having to use a warning nuke to show them that they were dead serious. Yet nukes will be only a weapon of last resort for Truman.
Nuking China will not look good in the International Community, no matter what justification the US can use. If the US is going to use nukes, they would probably have to go it alone, and perhaps even prompt a division within NATO and the UN. Yeah, China's communist, but the US will rightly be seen as an object of fear rather than a source of good in the world.
Regardless of what you think of the Chinese Communists, they did have a legitimate cause for war, as they had warned repeatedly to the US that if they got to the Yalu river, they would intervene militarily to protect their borders.