What you say about the southern Democrats is true as far as it goes. But you neglect the part about southerners leaving the party _en masse_ (the ‘Dixiecrat’ movement), after LBJ and others turned the party in a pro-civil-rights direction.
And how the GOP seized on this southern disaffection with Nixon and afterwards and ran with it (Atwater, ‘welfare queens’, Willie Horton, etc.).
So sure the Democratic Party has a history of racism, and the Republican Party a history of opposition to slavery. But that’s about as relevant to our current political state of affairs as is the dissolution of the Whigs.
There is no doubt but that as things currently stand, in the post-civil-rights era, all those old racist southern Democrats are GOP voters now.