Rule 1: each district should represent the same number of voters
Rule 2: each district should visually approximate a square or rectangle (rounded corners are fine, but no deep concaves, thankyouverymuch)
Rule 3: Use natural boundaries where practical. Roads, rivers and streams especially, mountain ranges, park boundaries
Rule 4: The only population metric which may be used when setting boundaries is the number of voters (and their party preference is explicitly NOT to be take into account)
Rule 5: boundaries are set, using a pragmatic application of the previous rules, by an unelected, impartial civil service, and reviewed by an independent body.
Sure, you’ll still get outliers, but as long as outliers are actually outliers, rather than the norm, then the odd outlier is ok.