There will always be some attempt at gerrymandering, whether it is partisan gerrymandering or affirmative action gerrymandering in an attempt to produce a district that will have a majority of voters from a disadvantaged group or just plain political horsetrading by incumbents desperate to keep their seats.
So why not try to tone it down by, for example, passing a law that in any district there must be at least one point where an observer could stand and have a sight line to every other point in the district that doesn't pass through an adjoining district. You could get districts shaped like an L or like a star, but you couldn't get the really extreme shapes that give voters the message they are being cheated.