There are several ways to do something like this.
1> In the HandicapInfos table are a bunch of bonuses. Remember that whatever difficulty YOU pick, the AI is still playing on Chieftain. Also, each handicap includes a couple modifiers for the AI as well; that is, a human playing on King gives the AI players a small bonus to research, gold, etc.
Very few of these are directly military, though, and it sounds like this is something you're trying to get away from, so let's go to the next option.
2> Create a Lua function using SerialEventUnitCreated to check each new unit's owner. If it's an AI, give it a custom promotion. The downside to this is the amount of overhead involved, as this event triggers multiple times for each unit and you'd be checking the owner's identity every time.
Alternatively, you can drop the promotion part and modify the base strengths of the unit directly. This won't work for ranged units, but it has the advantage of better stacking with promotions.
3> Create a Lua function that gives each AI player a free custom building in their capital. That building acts as a Wonder, giving all units that player owns a certain promotion automatically. The downside is what happens if a player's capital is conquered.
4> Don't use a permanent effect at all. Create Lua functions for RunCombatSim and EndCombatSim, and modify the strengths of the units directly during combat. So the AI will get an extra bonus right before the combat resolves, and lose it right after.
One issue with this one is that the AI won't know it gets this bonus. It'll make its decisions on whether to attack or not based on the "old" values, instead of seeing every combat as an easy win. Depending on what playstyle you want, this could be an improvement or a drawback.
5> If this is meant solely for you, there's another option: create a new Civilization with UU's for every unit type, where the UU is WEAKER than the normal alternative. This one would take a lot of work, but wouldn't involve any Lua.
6> Don't explicitly boost the AI, but instead add other modifiers that boost the way the AI generally handles its military (lots of low-XP, cheap units, fighting defensively, moving as a horde). For instance, giving every unit +10% when in friendly territory makes it a LOT harder for a human to sweep through his opponents, whereas the AI generally won't care. Or giving every unit +10% when adjacent to a friendly unit, or increasing the healing rate when in friendly territory... lots of things you can do that'd slow down a human player without significantly changing how the AI plays.
Personally, I'd go with #3, or maybe #2 if you're not comfortable with the start-of-game triggers. My own mod uses mostly #6.