Stolp, I think that if you want to defend on a frontier, you either have to just "keep them at bay" as you put it, or advance all the way to the edge of the world. If you play as England or the Moors, then perhaps you'll have two directions where you don't have to worry about enemies, but otherwise every border is hostile. The only thing that seems to work, at least somewhat, is to leave a 1-region buffer state between you and the people on the far side of your enemy. Hopefully you'll have gutted them well enough that they can't afford huge armies.

In my Byzantine campaign, I've stopped eastern expansion at Adana. I could zip over and take Aleppo, but the Egyptians have a large army at Antioch and they could get behind me if I did. Besides, it's getting close to Mongol time, so if they show up down here I'd like someone else to take the brunt of the initial assault. I've spent the last few turns systematically destroying the Venetian military and economy. Any army I find in the field, I destroy. I've got two spies in Zagreb and 4 assassins around it, sabotaging every turn. At the moment, every building in Zagreb that can be sabotaged is damaged. I don't think Venice has the money to repair them. Zagreb has a full garrison, because one army retreated there, but the citadel of Raguzza only has a two unit garrison. I'm trying to move an assault army there while screening it from Venetian forces with another army of all horse archers. I'll take Raguzza, replentish casualties there, and then siege/take Zagreb. While returning from a tour of the English Isles, one of my fleets discovered that Corsica and Sardinia are still in rebel hands, so I'll probably build a new army and ship it over there, making both of them into cities.