This is a little misleading
The Democratic Party today is not the Democratic Party from the 1860's, it had a gradual realignment in the mid-20th century with voters electing people who strongly supported civil rights and the Republican Party was made to stop the expansion of slavery, not to abolish it (Emancipation Proclamation did not abolish slavery within the border states and Lincoln himself said whether he'd have to abolish or preserve the institution of slavery, he'd prioritized to preserve the Union). If it was the party only meant to abolish slavery alone, how could it have stayed relative after the 13th amendment?