Take a look at this:

That is a fully grown Bull Elephant walking through a river infested with hippos. If I showed you the actual video, you would see that the largest land creature on earth casually walked through that water.
It didn’t even try to avoid possibly stepping on one of the hippos. Anything other than an elephant would be trying to run across that river as quickly as possible to prevent itself from being snapped by several jaws, or would decide against crossing it altogether.
So what…that has NOTHING to do with what you asked, right? My point is just to illustrate to you that if this elephant or any other sub-adult or full grown elephant could walk fearlessly through water with the most dangerous creature to man in all of the Mother Land (Africa) just about everywhere, then what would a crocodile do? What COULD it do?
It doesn’t matter how deep the river, lake or swamp is, elephants are too big/tall for the fight to be fixed in favor of the crocodile. The water, at its highest point, would barely come to the elephant’s knees. This “matchup” would be over in under a minute. The crocodile would be trampled to death. Or thrown high into a tree.
Even the largest crocodile species (the saltwater crocodile) stands precisely 0 chance of ever winning a fight against an elephant, on land, or in water.

Elephants aren’t simply stronger, bigger and more durable than other animals, they are in a completely different league, and no land predator, not even an entire pride of lions can compare to a single African-Bush elephant.
Even the largest predators have no means of harming a fully grown elephant, they have no weak spots, their testes are on the inside of the elephant so there is simply no easy target, their skin is too thick and too tough to penetrate and cause damage unless you’re a rhino, want to bite the trunk?
Sure, get ready to get thrown to another continent.

Once an african bush elephant matures, there is no animal on any continent that will take it’s chance in a one on one.
Lock a single fullgrown male elephant with any pack, pride or individual land predator/s, there will only be 2 options
- Become a skewer
- Be turned into paste, the elephant will significantly accelerate their process of becoming fertilizer.
That includes crocodiles.
A hippopotamus scaries the shit out of a crocodile. No crocodile wants to mess with a hippopotamus.

An elephant scares the shit out of a hippopotamus. There is a video about a lone elephant crossing across a lake surrounded by dozens of hippopotamus and hippopotamus are known to be highly aggressive and territorial and the hippopotamus was minding their own business instead of attacking the elephant. Hippos know they can do absolutely nothing to it.
Elephants are really huge and strong. A hippo looks like a child’s toy to an elephant and they can easily toss a hippo without any effort.

Now imagine a crocodile going up against a elephant.
There is absolutely nothing a crocodile can do either on land or water that would bring down a elephant.
Elephant wins.
