(Edited: Corrected the constitutional level to 3/4)
And, you can't gerrymander the Senate without moving state borders. That's beyond the power of any state legislature. So if you meant that to be a bootstrap path, it fails, because you can't use step 2 to cause step 3.
The one exception to the above would be if you allowed the state legislature to appoint the senators for that state. To do that, you'd have to repeal the 17th Amendment.
And, you need 3/4 of the states in order to ratify a constitutional amendment.
No, there aren't computational ways to achieve this. It's politics and people. In the past, one party has held extreme power but did not egregiously abuse it to remain in power.
I am not advocating this, just pointing out an even more straight forward way to do this.
If you can edit states, then yes.
Rigging a national election: No way. People bitch about how inefficient the voting system is but that's what gives the system its security. While it might be possible to rig a few areas (very unlikely though) it's impossible to rig the whole country since each state has its own voting rules and system. Coordinating an attack on all the systems is not possible. But it's important to note that we need to protect the system so it doesn't become easy to manipulate in the future.
We see voting manipulation in movies as part of the plot regularly. I suspect that's why people think it's possible. It seem so easy but keep in mind that it's fiction. Just like Superman being able to fly.
If you want to manipulate an election, the way to do it is by using mass media to misinform the masses . If you control the media you control the message and you can sway people to do your bidding. That's one of the reasons we have freedom of the press. It keeps the people in power from controlling the message and staying in power forever. We see this type of manipulation regularly in other countries.