Tactics for Elephants, Chariots and Camels
WEIGHTED RETREAT: Have your javelins do the bounding overwatch fire and retreat tactic THROUGH your legion squares, rather than through open space, where the faster chariots might catch them. The chariots will try to outflank you and your peltasts can simply form columns and retreat through your line of squares, with the chariots in pursuit. Your peltasts are not impeded as they retreat through your legions but the enemy are blocked as they pursue,and the chariots will be taking fire most of the time, as your javelins alternately fire and than retreat deeper into the safety of your legion squares.
Another effective method, is to wait for the chariots to become fully engaged with the heavy infantry, backed by javelins before siddling around their flanks or attacking their rear with cavalry. (This is the SATURATION STRIKE tactic I described earlier)
It's amazing how quickly they perish under this combined onslaught. Finally, the chariots attack piecemeal, and you can direct all your javelins, at the each successive group, as each attacks a different portion of the shield wall.
Any of the methods just described for chariots works well, though somewhat less well for elephants.
Bringing victorious or unengaged legion squares forward against the flank of enemy elephants still fighting frontally with other sectors is also effective. In frontal battles, Keep your square formation in a static position, and don't move it to attack the elephants frontally. When sent forcefully forward into a frontal attack, the square crumples against it's target and looses formation cohesion and defensive strength. When you bring a square forward in a flank attack, just barely touch it's outer rim against the enemy elephants, so it keeps it's formation (A signification of gentleness toward Pachyderms which Incontinetia would no doubt appreciate.)
Finally the DENSE PACK formation, in which several squared legions are assigned to densely overlap on the same space, can stop elephants cold unless they are in large numbers.
These are fragile units, whose archery scarcely penetrate a testudo formation. A simple Shield wall backed by javelins is more than sufficient.
By the time you do anything more complex, they'll be driven off anyway.