After picking up some production tech (such as merchant navy), in about 1/3 of my games I'd make barracks in every city.
For the Heroic Epic (at a coastal city, so the bonus applies to ships as well) ...
Then I sell all my barracks (except in the city with the heroic epic).