Ah good to hear the AI managed to take some players out and gratz on the win

Thanks for the feedback!
The amenity thing is something I've also observed, but there's no real obvious solutions. The one thing I've been considering is force them to build entertainment districts in modern era, which is something I can do. But, since there's no way for me to have it depend on actual amenity issues, it would spam it everywhere it can, including new cities. And simultaneously, it might not actually build it in the big cities where it matters, since theyll have hit their district limits and arent growing because of the amenity issues. Even ignoring that, it's just one entertainment district that won't actually do much. you do occasionally see entertainment districts, and they still struggle. I believe the main issue is that they don't actually change their policies to help with amenities, which is something I can't control.
They do repair districts, but rarely. and yeah, they're way too expensive. I'm not sure if repair time can even be modded because there doesn't seem to be a separate value for repair times, it just depends on what a new district/building of that type would cost.
They have 'defend city' operations, so yes, there's something there, but there's some issues with them
For starters, in vanilla if there's no city currently under siege, they'll point these operations at seemingly random cities. They don't predict which city is going to get attacked and put their units there in advance. Since this was taking units away from actually useful operations, I turned this off in AI+.
When you attack, they can start sending their troops in, but, they don't always seem to start their operation appropriately. It's common that it doesn't trigger at all, triggers too late, or they spend too much time collecting troops before sending them in, occasionally they'll also send them to the wrong city (possibly when that other city also saw a unit?)
In the rare case their operation is send timely and to the correct city, it's often still not very effective because the operation basically consists of 'grab some units, walk them there, attack units', there's no real clever behavior such as fortifying in good spots. The amount of units, and the exact units selected are also often off. So yeah, it's all not very effective.
The main defense you'll usually encounter actually comes from two things: either it's random units nearby marching into the battlefield, or they want to attack a city that happens to be behind your army.
You'll usually find that the defenses are strongest before ~renaissance, because that's when the ratio units/terrain tends to be highest. In modern etc, they tend to have more terrain and less units.