https://slate.com/news-and-politics/2018/02/how-the-i-cut-yo...
https://slate.com/news-and-politics/2018/02/how-the-i-cut-yo...
Gerrymandering is not a technological problem.
People outside of (partisan) politics don't often get to see that the party orgs and the politicians are usually in conflict. More so on the left than on the right.
There is a whole field of study around efficient "cake cutting" algorithms, many of which contemplate and account for defectors.
Essentially, in a first past the post system, voting for any other candidate other than the one both most likely to win AND whose politics most closely aligns with your own is effectively a vote for the major party candidate who least aligns with your politics.
[0] https://en.wikipedia.org/wiki/Duverger%27s_law
edit for link.