If, following the end of the Civil War, the United States had identified the Confederate politicians and military officers as having committed treason (I’d imagine issuing a pardon to anybody who didn’t obtain a command - in this case, just following orders would constitute a defense), and following military trials conducted according to the standard of proof laid out in the Constitution
found them guilty, and then had them hanged until dead, America would be a more cohesive, and less racist, society today.
Imagine if the lost cause narrative was instead countered with some famous picture of Robert E. Lee’s dead body hanging from the gallows (one that school kids would be pretty familiar with - sort of a milestone moment in American history). And Jefferson Davis is notorious as “that guy who tried to escape dressed like a woman.” Make his hanging famous, too. The glory of the south’s secession is pretty hard to render when the government, in accordance with the constitution, clearly labeled them traitors, punished according to the custom of the time.
It’s not like they don’t fairly qualify for the charge. If ever there was a time when the U.S. could claim jurisdiction over a person, and the find them guilty of the one crime that is outlined in our founding documents, it’s when these people founded a confederate government and then attacked and killed Americans.
Trials would be simple. Are there two men who can testify that he saw this defendant astride a horse, leading soldiers to war? Maybe a witness will be a former rebel soldier who will say “that’s the man who gave me orders to attack”, or it’s a union man who will say “that’s the man who led the charge”, but we should have an historical record of dozens of these trials, so that at least all the generals got their comeuppance.
And anybody elected to the Confederate government (I exclude state level office holders; I presume that during the rebellion states still had things like governors), who voted on the appropriation of supplies to these soldiers, is levying war as well.
I think that the reckoning would have been important. I believe that it would have reduced the impetus for the black codes after reconstruction (which culminated in the widespread de jure segregation that only subsided 100 year later) and laid precedent for a federal government that would enforce the law, thus ensuring that the “states rights” crowd that pushed back against civil rights would be far less effective.
America never purged itself of the ideology of slavery the way, for example, Germany did with the Nazis.
I truly think that would have been facilitated if the nation had executed those responsible. Their ideology would, of course, still be enticing to some, but our society would not be tolerant of such bigotry the way it remains embedded today. And we’d have an alternative history that did not permit the extreme pushback against progressive ideas that has been the hallmark of the old confederacy.