Civ 6 seems like a game where it would have been good for them to add hooks for people to add their own AIs easily.
I suspect the built in AI does okay if you place units in a limited area (which is likely how they tested it), but it struggles getting armies around the full game map with complex borders.