I would argue that by going after Israel in such a blatantly biased way the ICC and the UN have fallen to precisely the sort of groups you want to use them against.
Not saying the ICC can't be useful, you would just have to massively limit the scope of their "authority" to realistic targets. I.e. South American dictators and various warlords. And of course islamic terrorists.
Plenty of international law works because it actually serves a useful purpose for states like shipping. Countries don't like domestic terrorists and crime organisations. They would also prefer africa to be developed so they can trade.