Karl Marx was alive during the civil war. We know what he and his fellow communists thought about it. In fact, some of his fellow Communists were Forty-Eighters: German Radicals who were exiled after the failed revolutions of 1848, many of whom fought in the civil war.
One of them was August Willich, an ardent Communist who thought Marx of all people was too conservative. A "Tankie" of his day.
The German Communists, like Willich, who fought in the American Civil War believed that the war against slavery, and in the side of the Union, was a Social Revolution against the reactionary landed gentry of the south.
Many Forty-Eighters settled in Southwest, Ohio. If you go to the rapidly gentrifying Cincinnati neighborhood of Over The Rhine, it's called that because it was originally made up of forty-eighter German immigrants, who became active participants in the underground railroad, and helped set up social programs to educate freed slaves, and provide them with housing and such.
So the only person lacking critical thinking here is you OP. You've made up a guy in your head, to get mad at.