I know I read the record of this in the Congressional record, but believe few others here did that. First in 1964, the bulk of Democrats fought the civil rights you mention. It was proven as the filibuster against the law by Democrats. They did not care what Johnson wanted, which was not freedom for blacks, but votes from blacks.
Factually we, former Democrats did not abandon them when you claim, we left in the 1980s after the debacle by Jimmy Carter hit us
What you suggest is the racist Democrats really did not want to be racists so they leaped to being Republicans. I wish that happened. But we former Democrats bailed on long past that.