Forts can be employed usefully to create chokepoints where there are none. For example, I once was forced to declare peace against Babylon - a strong cultural, technological, and military power. The AI was significantly ahead, and we shared a border stretching from one end of an egg-shaped continent to the other. It was like the continent was cut in half between us, with me as the lesser power.
To help secure my borders, I built a line of forts all across the field. Not only do the forts defend my units when they're in them, the barricades also force attacking units to stop for a turn, ensuring no scary bliztkrieg-like tactics. Of course, you can't really build a line of continuous forts. I had to settle for pillaging the railroads in between the forts, and then securing the rest with Infantry.
This allowed me to hold off their attacks on one end of the continent with a relatively small force, while I attacked with advantage on the other end. Then, using railroads, play switcheroo.