Is your Toxapex properly EV trained? If not, that could be a reason it's unable to tank hits, specially if they're neutral. Ensure you've got good EVs spread across in HP and whichever of Defense or Special Defense that you think is more useful for your team.
Also, as is the case with most defensive Pokemon, using them is not easy. They're not like hyper offensive Pokemon (like Greninja) in the sense that they need a good amount of prediction and counterplay to slowly turn the tide of the battle. Note that Toxapex is not good at generating momentum by getting kills as much as it is at making your opponent lose their momentum.
This is the reason it's used as a pivot, so it can sponge neutral hits, threaten to Haze/Toxic/ or simply Recover, forcing your opponent to switch out.
Playing with Toxapex is much easier when you use it to switch into attacks, specially if the opponent is Choice locked, allowing you to fire off a free Toxic or Toxic Spikes while they switch, before retreating to safety. This allows you to prevent yourself from being swept. This requires you to take that risk, as whether Choice Spec Greninja will use Ice Beam next or Dark Pulse, because you can easily beat Ice Beam locked Greninja 1 on 1 but Dark Pulse will eat you up.
Any time your other stronger (sweeper) Pokemon are being threatened by a move that Toxapex resists, just bring it in. You can also use it to absorb Toxic Spikes and lay your own. And then you have to switch out, because it is a Wall but also a Pivot.
- EV train your Toxapex
- Bring it in to sponge hits that threaten your sweeper
- Use it to reduce opponent's offensive momentum
- Use it to set up Toxic/Toxic Spikes as they switch out, or haze them if they have stat boosts.
- Don't be afraid to switch it out if the opponent has strong neutral or super effective attacks.
Also, make sure your Toxapex has good synergy, type wise, with the rest of your team. If they share too many weaknesses, it's not much of a help to you at all, so keep that in mind.
Finally, the playstyle Toxapex requires to really shine is a very predictive, slow, defense oriented playstyle that isn't everyone's cup of tea. Some find it easier to play Hyper Offensive, others like Balanced, yet others prefer Stall. Take a good look at what you're good at (or, rather, what is more fun for you) and run with that. Don't beat yourself up if you are seemingly unable to use a "top" or "good" Pokemon. Theres more than enough Pokemon and playstyles for all (:
Good luck with Toxapex, but don't hesitate to use Milotic just because Smogon said more people use Toxapex.