What is badly needed is an equivalent of the US supreme court that is able to say to any UN body"well, actually, the UN charter says you cannot do that".
A judicial authority doesn't mean squat without the means to enforce its decisions.
I'd be more worried how you could maintain consent and participation in such organization.
Even if you had some way of enforce your resolution on countries like US or China the whole idea is a bust since they will simply leave the organization.
It