The premise of the question misunderstands the state of the American economy and the nature of its industrial development in the eve of the Civil War. Rather than large corporations with several facilities throughout many states and with a national outreach, before the Civil War American industry followed a local and regional pattern of development. This means that although farms and facilities were expanding and growing and taking advantage of modern mechanization technologies, for the most part such industries were still owned by individuals or families and serviced a local or regional rather than national market. So, instead of picturing a big textile corporation with many textile mills across New England, for example, in truth there would be many individually owned textile mills across the region.
The growth of industry and concentration of capital that would give birth to many corporations with national outreach would only happen after the Civil War. In fact, the Civil War is partially a cause, for it solidified the national character of the United States and increased the power of a Federal government that became more and more identified with the interests of the wealthy and their expanding corporations throughout the Gilded Age. The wartime need to expand, mechanize and standardize production of materiel such as uniforms, arms, metal, railroads, and food, together with the massive profits made through Federal contracts, fundamentally transformed the North's economy. The war thus gave rise to an "Age of Capital", where the little individual workshops and factories of the antebellum became part of enormous national corporations.
Of course, these were trends that were visible before the war, and it was clear that the North was heading towards this direction. But the war ensured that this would be the American future and accelerated the already present trends. This means that there were hardly any American companies with facilities in both North and South. Consequently, when the war came there was little doubt of whose side they would fight for. Of course, the Tredegar Iron Works of Richmond would produce arms for the South, and of course the textile mills of New England would produce uniforms for the North. Since these companies were small and regional, they would naturally follow the allegiances of its workers, owners and regions.
Nonetheless, this does not mean that the war didn't affect or change the way companies had to operate. The most obvious example of this was those companies and factories of the Border States like Missouri, Kentucky, and Maryland. It was truly a Brother's War there as people divided their loyalties and picked one side or the other. Naturally, siding with the Union or the Confederacy meant having to support them with industrial or agricultural goods. In the Border States, those who chose the South often brought about their own ruin, as investment in the Confederacy failed to pay dividends on the short term, with rival pro-Confederate governments collapsing easily (as in Missouri) or never being created in the first place (as in Maryland). Most of these unlucky investors were planters, with the industrial factories often siding with the Union instead as merchants, entrepreneurs, and industrialists were the Republican base. Indeed, the few centers of economic development and industry of these Border States would soon become centers of Republican control, and in this they benefitted from the economic transformation of the North.
Even when loyalties and control was uncontested, the war did affect small factories and workshops profoundly. In the South this is more evident, for the weak Southern economy, overwhelmingly agrarian instead of industrial, and moreover affected by the devastating Union blockade, found it difficult to produce the war-making materiel the South desperately needed. Inventive solutions, such as melting Church bells or leaching chamber pots for niter, had to be used. Yet the South was always outpaced by the North, and as the war advanced the South found it increasingly hard to clothe, arm, and feed their troops. This was mostly because of the disastrous deterioration of the Southern rail system. Already much behind the North before the war, Southerners could not replace or rebuild the railways, or the trains destroyed by the Yankees. As the war shifted to become more destructive, Southern industry collapsed and the whole region would remain backwards and undeveloped for decades to come.
Northern factories suffered in a different way, and this suffering was limited mostly to the textile industry and other sectors that had relied on Southern raw materials. The United States' economy had been sectionally complementary, as the cotton produced by Southern plantations was then used by Northern mills. This was one of the bonds of the Union, which Fire-Eaters and Abolitionists both denounced. Fire-Eaters like J.D.B. DeBow because they felt it enslaved the South to Northern interests, and abolitionists like Charles Summer because the alliance between "the Lords of the Loom and the Lash" protected slavery. And indeed, Northern industrialists and factory owners were in their majority conservatives who discouraged any radical measures that might alienate the South. Their need of Southern cotton was a point of pride and was behind the Southern reasoning that Northerners would bow to "King Cotton" and grant them their independence. This, of course, did not happen, but the need to feed Northern industry did inform many political, economic, and even military decisions of the Union during the war.
We need to consider the only two industries that did not conform to the pattern I described above: railways and banking. These were the only industries that followed a more modern way of organization and operations, having stock and corporate organization, and operating in a more national level. But this was still a far cry from the post-war giant corporations, as railroads and banks still mostly served a regional population. During the war, due to their importance, both the Union and Confederacy, regulated these industries like never before. Both obtained the legal power to take over railroads, but this was mostly used to force them to give priority and fair rates to the military. The Union obtained better results, while the "Confederate government was never able to coax the fragmented, rundown, multi-gauged network of southern railroads into the same degree of efficiency exhibited by northern roads".
Banking on the other hand had a more national character. But the South was weak here too. With only 12% of notes in circulation and 21% of banking assets, Confederate banks were far weaker than their Northern counterparts. Before the war, planters often entered into debt to finance their operations and would pay it off after the harvest and selling of the crop. This debt was mostly held by Northern investors, who extended credit and loans gladly. The war severed this, causing hardship and economic aftershocks in Northern banks. The Union, with its underlying economic strength, was able to survive through the creation of a national currency in the form of the greenback dollar. For their part, the Confederates attempted to finance the war by decreeing that those who owed money to Northerners should pay it to the Confederate treasury in exchange of bonds. Few did - and those who did get Confederates bonds would be ruined after the collapse of the Southern government. Laws were also implemented in both North and South allowing for the confiscation and sale of properties held by rebels or Yankees respectively.
But ultimately, as I already described, the age of the giant national corporation had not yet come. Almost all industries were small and regional, with only one factory or workshop under the control of an individual or a family. These did not have facilities in both North and South. The few assets that Yankees held in the South, or Confederates held in the North, were confiscated to pay for the war. But you would not see a national textile corporation having Southern facilities confiscated because the economy was not like that yet. Often what was taken was investments, credit or loans that would not be repaid as consequence of the war. But the small factories of the nation would merely pick the side of where their only facility was located. The war did, nonetheless, start the transformation of industry that would birth a United States where there were indeed national corporations with facilities all over the nation.