While there's nothing necessarily wrong with depicting death in a children's film, it generally makes sense to err on the side of caution in terms of how that death occurs. That makes the fate of Clayton in 'Tarzan' unusual.
Clayton was an unpleasant character, and he deserved some retribution. That didn't make it any less shocking when he fell into a ravine and ended up being hanged by the vines. That's a particularly nasty execution-style death, and it's not child-friendly.