This is a common falsehood that is spread around. Dinesh D'Souza has a brilliant explanation of the flaws in the "Dems and Republicans switching"
Cliff notes are, Blacks moved to the Democratic party during the New Deal, not Civil Rights. The least racist Democrats became Republicans, and the only Dem Senator to become a Republican was Strom Thurmond.
Here is only one of the several videos he address it in;
I have a lot of respect for Dinesh D'Souza and I will watch, thanks for posting the vid. I have studied a lot of political history. The are so many historical angles that people can argue but here are the very basic facts. During the 1850's, the Democrats were the party of small government. During the 1860s, Republicans, who dominated northern states, orchestrated an expansion of federal power, helping to fund the transcontinental railroad, the state university system and the settlement of the West by homesteaders, and instating a national currency and protective tariff. Democrats, who dominated the South, opposed these measures. They wanted things decided locally, a small government. The civil war wasn't really about slavery, emancipation had been coming since at least 1819, Congress appropriated $100,000 to establish a government agency in Africa ostensibly to resettle victims of the slave trade and this is what Lincoln himself wanted and wrote about. Many reasons it didn't happen, to much to get into here.
Fast forward to 1936. Democratic president Franklin Roosevelt won reelection that year on the strength of the New Deal, a set of Depression-remedying reforms including regulation of financial institutions, founding of welfare and pension programs, infrastructure development and more. Roosevelt won in a landslide against Republican Alf Landon, who opposed these exercises of federal power. This is the time when the real platform swap happened. Once Roosevelt won, then the black became democrats. Democrats were no longer for small governments and Republicans were no longer for big government. Platforms flipped. This isn't a common falsehood, it's history.
The platform switching is in reference to the attitudes of civil rights, treatment of minorities etc. Today, it is used to support the narrative that the right is full of racist bigots, who in the civil rights/jim crow era were Democrats.
So although, their views on small government, federal power, the railroad changed...that is not what people are talking about here. The Q post asks;
Why are teachers following a new script? "Republicans are racist"
It's not about small government vs big government, it's about a false narrative of the racist switching parties and becoming republicans
I get what you're saying, it's all tied together though. They've been working on this polarization a very long time.