I think it would be better to have a unit suffer a penalty for being surrounded. For each enemy unit adjacent to the unit's tile, the unit suffers a penalty if attacked. Possibly this could only apply if attacked by a unit with flanking or something. I have always thought that surrounding a unit with multiple units was a good way to discourage SoDs. It would also make defending a city a proactive defense. The AI could be programmed to utilize this as well as many other strategy games have employed this tactic and the AI seems to know how to use it fairly well.