Treason
1. the offense of acting to overthrow one’s government or to harm or kill its sovereign.
2. a violation of allegiance to one’s sovereign or to one’s state.
3. the betrayal of a trust or confidence; breach of faith; treachery.
Lee nor any of the men who resigned their commissions and joined the CSA were committing treason. They did not seek to overthrow the government of the US. They sought to replace it with what they regarded as a more just government only on what they regarded as sovereign State soil. They did this openly and publicly so that their was no treason involved (see:Benedict Arnold). The issue of slavery was a cancer on the US political system from the start. It was the subject of several important compromises (see: Missouri Compromise) that sought to balance the economic needs of the South with the moral positions of the North. It is one of the tragedies of our history that we could not find another compromise that would have taken us another 50 years. By then, the development of the gasoline engine would have spelled the end of slavery as the overhead for maintaining slaves would have become so high as compared to maintaining machines (per unit of output/per unit of investment) that no one would have been able to competitively afford them.
You make an interesting legalistic argument as to the nature of Lee’s alleged offense against the Constitution. Lee’s lawyers would have made those very points if it came to that. Nevertheless, the thing that save Lee was his willingness to surrender his forces intact rather than to disperse them for guerilla warfare. That is why he is honored to this day (by most Americans).
Using that logic, the steam engine could do pretty much the same. By that time they were compact enough to already do so.
And IIRC before the war steam railroads and riverboats brought “King Cotton” north where they were exported from northeastern ports.