Assuring China that we would not cross their border would not have changed anything; they were determined to preserve North Korea as a buffer state. (Given the current state of affairs you have to wonder if they regret that decision, but I digress.) They were sending troops into North Korea well before we approached their border; by the time we got that far their forces outnumbered ours.
Getting a declaration of war from Congress would have been difficult, given that neither the US nor an ally was threatened. (South Korea was an unofficial protectorate, not an ally.) What Truman did instead was to take his case to the UN and get them to pass a resolution condemning the North Korean invasion and authorising member nations to send troops to defend South Korea. (Technically in entering North Korean territory we were exceeding our mandate, but the only nation that would object was the Soviet Union, who had made the mistake of boycotting the proceedings instead of exercising their veto.)
Once the Chinese entered the war it essentially became unwinnable for both sides, barring the use of nuclear weapons. Given that and the fact that US unpreparedness stemmed from Truman's own austerity measures his loss in 1952 was virtually assured.