The site search has greatly improved recently. If you have given up on it, it’s worth trying again:
https://suttacentral.net/search?query=in:ebs%20elephant
AN5.139 is the 11th result.
If you also add “battle” it’s the second result.
BTW, MN125 also has a related simile about training an elephant for battle.