I would say it would be more efficient to limit the AI to, at most, a half stack if it's not at war with land neighbors, and let it keep a full stack if it is. That seems like something that would be fairly simple to do, although IANAC.