The problem with the efficiency gap metric is that it incentivizes cooperation between the parties to generate "safe" districts.
You can turn it into an optimization problem instead if you try to minimize the wasted votes for the entire state. This ensures that you don't get states with districts that all have huge -- but equal! -- efficiency gaps.