AI unit behavior is devilishly difficult to manage and AFAIK we can only change one setting that affects this. I haven't had much luck with it myself, I could add...
But there might be something I'm missing?
Yes possibly, I've no problem with Hannibal deciding to attack france, I understand that is not controlable. Its just the rest of the army disappeared.
I now realise it was because the quite large army was garrisoning milan when I killed hanibal. Hence western Europe flipped to me and these units disappeared.
Presumably If you really wanted you could kinda recreate hanibals march by repeatedly spawning and killing the same units ?