To explain gerrymandering....it's the practice of setting up 'lines' and saying that you can manufacture a certain outcome (based on past polls) and build a district to get a result in every single election.
Gerrymandering was haphazard until you get to after WW II.....where numbers start to be collected and project things.
First, it's not illegal. While various political groups will say (from the left and right) that it's unethical and illegal....both are untrue.
Second, judges are in a hopeless situation. If you say x-situation in Ohio is wrong, then y-situation developed for Florida is also wrong.
Resolving or fixing this? All you'd have to do, as Congress....is write a two-line solution that says you can only make district 'lines' along a county line. Rivers and roads won't be accepted in this construction anymore.
Wanting to fix this? I would suggest of the 1-million-odd problems that exist in America today....this is probably near the bottom 300, and really not regarded as a big deal.