Strong second to OP's post: I went looking for the 0 AD forum just to post about this topic!
This AI behavior makes the bot mode unplayable, because the game never gets past a couple minutes. It's just like OP said: the AI will send an attack including their hero. The hero retreats when they get lower health, but somehow their aggro keeps getting triggered so they keep walking back toward your troops then walking away. The AI enemy hero always ends up dying.
Interestingly, I only remember this happening within the last couple months (sorry for vague time range). This summer, the AI enemy hero used to retreat properly.
I would say @Vantha's PR for campaign UI would have to be merged so we could have some form of narrative, then if the mod author is willing this may be a good first campaign to work on polishing.