The first essential is to remove William Jennings Bryan.
He is the key figure. His nomination clearly established the Democrats as the party of reform (since the end of Reconstruction, if not earlier, there had been little to choose) and drove large numbers of more conservative easterners over to the Republicans, which in turn strengthened Conservatism in that party. Thus from 1896 former swing states like NY, NJ and CT moved definitely into the Republican camp.
There was a rather similar pattern in the Border States, where since 1876 (earlier in KY) Republicans had had about as much political clout as Buddhists, with the Border becoming virtually part of the Solid South. From 1896 through the 1920s, this became a "swing" Region, with Border States (KY again a partial exception) going Rep as often as Dem, while DE and WV became fairly safe Republican States, as did Indiana, which never went Dem again in a straight fight until 1932. Again, this weakened conservative forces in the Democratic Party, while strengthening them in the Republican.
This set the pattern irreversibly. Even TR could do little more than "rattle the bars", hence the speed with which onservatives regained control of the GOP once he was gone. Even had he gone on longer, WW1 would have forced him into alliance with prowar conservatives like Lodge so that they would regain control another way.