I probably do something wrong, but I found that javelin cavalry on skirmish mode are always caught, and are destroyed within seconds, by chariots. Especially the Egyptian vanilla chariots come to mind

Concentrated arrow fire combined with spearmen/hoplites usually does the trick for me.

I can't remember meeting enemy elephants on the battlefield, but I do now that it's rather risky attacking archer-heavy armies with your elephants: soon the AI will concentrate its fire arrows on your poor elephants and they run amok before you know what's happening.
I remember once fighting a battle against the Romans (I played the Seleucids). I had two units of the strongest elephants (war elephants?) but unfortunately they had two units of heavy artillery. They soon targetted my elephants with those explosive fire rocks, and the first attack was a direct hit. My elephants ran amok, killing half of my army (didn't count the losses).
That hurt. A lot.
So now I am very cautious when I use elephants.