There is this notion that the parties "flipped" sometime in the mid 1960s that's simply false. Republicans were from the inception the party of religious wackadoodles and capitalists. Democrats, at least since right before the civil war, were the party opposed to big business, banks, etc. The segregationists weren't just Democrats. They were New Dealers. They were New Dealers because the south was agrarian and at odds with big business (over tariffs) and banks (over monetary policy and debt). When Wallace broke off in 1968 to run on a segregationist ticket, he touted his pro-labor background. And as a result of that coalition, the New Deal and related programs were inextricably tied up with segregation: excluding most Black people from social security, creating redlining through the FHA, etc. See: https://jacobinmag.com/2019/06/rothstein-segregation-color-o... ("Walker’s second point overlooks that the New Deal did not merely concede to private bigotry but pursued independent racial policies that did much to create a segregated landscape that persists today.")
The South didn't really flip until Clinton. (Reagan won it, but he won everything.) Carter decisively won a bunch of southern counties that were 95% white. And ultimately it did so not because of the "southern strategy" but because southern states industrialized, and Republican ideas of low regulation and low taxes were great for attracting jobs and industries from northern states.