Here’s a path forward:
Legislatures get to draw district lines with a huge amount of discretion, being the majority elected by the people.
Courts need to take every measure to enforce that elections are FAIR and not fraud prone, or to allow states to pass election integrity laws (voter I.D., citizenship proof, shorter early voting, etc.) without meddling.
The former will benefit Democrats in a state, and the latter will benefit Republicans, hopefully a net wash.
I’d prefer a mathematical algorithm requiring all districts to be as compact and contiguous as possible. Let the votes fall where they may.