I was thinking about this in my current game when both myself and Ethiopia were sanctioned mainly by the diplomatic juggernaut that was Siam, to whom we were the main threat. So yeah, a few brainstorming ideas:
a.) make sanctions a temporary resolution, i.e. if voted into effect, it only lasts a certain amount of turns, for example 30 turns (not sure if feasible code-wise), after that it can't be re-proposed for another amount of turns (let's say 20 turns);
b.) make sanctions require a special/higher majority (how high would be up to discussion) - not sure how feasible code-wise;
c.) split it into two separate and mutually exclusive resolutions: diplomatic sanctions (can't make DoFs or joint wars, can't use open borders, can't make defensive pacts, can't trade vassalage, can't trade techs, can't trade research agreements, can't trade votes, can't bribe re: wars; great musicians can't be used in their territory; all current diplomatic arrangements (open borders, defensive pacts, VOLUNTARY vassalge etc.) cease effect immediately; all this applies to vassals of the sanctioned civ, i.e. the vassal and master can make deals with each other, but the vassal cannot make deals with 3rd civs) and economic sanctions (can't sell or buy resources, can't send or receive trade units except with owned vassals (so not even with city states), all current economic arrangements cease effect immediately (that would be more AI friendly, because the human player currently has an advantage of knowing to buy&sell as much as possible before a sanction vote), new corporations' franchises can't be established, but existing ones remain in existence)
d.) have the sanctions NOT apply to civs sharing the same ideology (let's imagine that ideologically aligned civs would shun any attempts by the UN to curtail trading/diplomacy between them)
e.) eliminate certain aspects of the sanctions effect
f.) eliminate sanctions altogether
I'd personally prefer the c.) option, because that way you'd have two different tools available to harm another civ, but you'd have to choose between them, so no civ would be completely cut off from the world, making sanctions less extremely punishing, and I also like the d.) option, making ideological groupings more meaningful . The problem I see with the b.) option is that a diplomatic runaway can at some point wield almost complete control over the congress, bypassing the effectiveness of the higher majority condition, also I imagine it'd be hard to code. The a.) option also seems hard to code, but other than that I think I like it. I'm not a fan of e.) or f.) either, but I could be convinced for either option.