Well to answer this let's see what the actual problem is......
I'll use the Tier 2 antiquity units as the base since cavalry doesn't begin until Tier 2:
| Tier 2 | |
| Infantry | Cavalry |
Production | 60 | 80 |
Gold | 240 | 280 |
Movement | 2 | 3 |
Combat Strength | 25 | 30 |
Sight | 2 | 2 |
Gold Maintenance | 1 | 2 |
*Note: Cavalry also has the ability to ignore enemy zone of control
So based on this, we can gather that the cavalry unit is stronger, faster, more expensive, requires more gold maintenance, and can ignore zone of control. It seems the idea was to make the cavalry unit better but more expensive; however, how the game currently plays, the cavalry unit is not expensive enough to choose infantry over cavalry. The obvious and simplest solution to this is to make the cavalry units even more expensive.
We should also keep in mind there are other aspects in the game to consider that affect these stats. One example is the economic leader attribute that reduces gold maintenance on units. Another example is the Iron and Horse Resources. Maybe you have 6 Iron with no horse resources. At that point, you'd have about the same strength as cavalry, so you might just want to stick with infantry.
The main problem is there's no strategic distinction between the two units as compared to their counterparts ranged and siege units. There's not a good enough reason for me to choose infantry over cavalry. Right now Ranged and Siege units each have their own situational purposes. The infantry unit also does at first, but once cavalry units are unlocked, the infantry unit almost becomes obsolete.
As some have mentioned, - 5 combat strength to fortified districts and units could be a good start. I also like this for the reason that it could make taking a settlement more difficult without siege units, increasing the need for them as well, but also at the same time, makes the cavalry units as strong as the infantry units when fighting fortifications. Not sure about not letting them fortify though. Not sure how well that would work with the current fortification mechanics, and as Berrern has mentioned, they're usually used on the offensive end, but on that same note, I wouldn't mind them doing a little worse while defending (Maybe -5 combat strength). I also like the idea of using flanking although I'm not really sure how that works. I assume you would lower the combat strength of cavalry, but then reward them with combat strength when flanking. There also might be an opportunity within the Army Commander promotion tree or maybe even Militaristic leader attribute tree to make the necessary corrections.
In conclusion, the main problem is the infantry unit is lacking a role currently in the game. There's a reason to have ranged, siege, cavalry, naval, and air units, but strategically, there's no great reason for you to choose an infantry unit over any of those. The only exceptions are Unique Infantry Units and having a lot of Iron Resource and/or the CS bonus providing combat strength to infantry (and this one is a stretch). So I don't think the question is necessarily how to debuff the cavalry units but more along the lines of how do we make the infantry units relevant again.