Contrary to popular misconception, it was probably more due to economic issues and anti-Communism, not race and civil rights.
Interesting point, and there's probably a lot of merit to that argument. But the extreme racial polarization of the South seems, to me, to point more towards civil rights as the main reason. Also, states' rights were central to the candidacies of Thurmond, Goldwater, and Wallace, and these were three of the strongest non-Democratic candidates in the South in that time period. It seems likely to me that a)white supremacy was the top issue in the Deep South during this time, at least when it was an issue and b)white supremacy was the key driver in moving the Deep South into the Republican Party.