The unabashed white supramacists who support the Republican Party beg to differ with you.
And, Republicans did all that good stuff before they implemented the southern strategy, which was blatantly racist and a 180 degree turn from their prior values vis-a-vis race.
Southern strategy - Wikipedia
The flip-flop of the moral base of the parties actually took the bulk of the 20th century.
It's certainly true that the Republican Party was formed from proto-libertarian northern industrialists and a northern Evangelical moral base formed--for different reasons--to abolish slavery.
After their initial purpose had been completed in the latter half of the 19th century, the Evangelicals went on to further Progressive pursuits (and, yes, they called themselves "Progressives" at the time). Those pursuits included prison reform, labor condition reform, environmental conservationism, gender equality, and continued racial reconciliation.
However, those Progressives began to butt heads against the proto-libertarian industrialists on those labor condition reform issues, so that by the beginning of the 20th century, the Progressives pulled out of the Republican Party to form the Progressive Party (aka Bull Moose Party, headed by Theodore Roosevelt).
All along, since before the Civil War, the Democrats had continued to be social regressives in every way that the Progressives were progressive: Prison reform, labor condition reform, environmental conservationism, gender equality, and continued racial reconciliation.
At any rate, the Republican Party glided through the first half of the 20th century with nothing but its industrial side, which was firming up their Libertarian concepts. But that was not an election-winning composition for a party.
The Progressive Party alone wasn't winning elections either, so it infiltrated the Democrats from the north, as the moral opposition to the Libertarian industrialists, championing causes such as labor condition reform.
By the third quarter of the 20th century, the Democratic party was fully schizophrenic, progressive in the north and regressive in the south. That was the situation when the Republican party began to use its "southern strategy" when Barry Goldwater (who at heart was a Libertarian, not a segregationist) was so opposed to the Civil Rights Act on Libertarian grounds that he was willing to ally himself with segregationists to fight it.
Then the Republicans once again regained a "moral" base when it was joined by Dixiecrats of the so-called Moral Majority. Eventually in the 80s they'd gain--for the first time--Catholics over the abortion issue as well as reaction to Affirmative Action in the northeast.
But be sure to note: The old Dixiecrats of the 50s, 60s, and 70s would refuse actually to join the "Party of Lincoln" and would die as Democrats regardless of how they actually voted or the regressive causes they supported. It would be their children who would actually sign on to the Republican party roles in the 80s and 90s.
So the flip-flop started at the close of the 19th century and wasn't completed until nearly the close of the 20th.