Is there a mathematical class and structure in which there exist many objects that are distinct, invertible, commutative and idempotent? Like a set of toggle switches with no hysteresis, so the state does not depend on the order in which the switches were flipped (and pressing down on a toggle that is already down, or vice versa, does not alter it further).
My motivation is that this relates to the "module" environment system in Unix, where infinitely many modules are possible, and each can be individually loaded or unloaded. Unfortunately this module system is prone to bugs where it does unexpectedly depend on the order in which different modules are loaded (and unloading or reloading modules is also unreliable), since the modules are each implemented by shell scripts, i.e. sequences of instructions which in general are not commutative, idempotent nor invertible. (I think a module is even permitted to load another module, so the toggle switch analogy is not perfect..)
Edit:
Or is inverse too strong a concept? Maybe instead I need there to be two operations, like raise and lower (or add and subtract, or load and unload), since flipping down switch A is not performed by flipping up some other switch A-1?
I suppose I would want properties like:
$x+y=y+x$
$x+x=x$
$x-x=0$
$0-x=0$

Suppose that $a$ is idempotent and invertible. Then $a^2=a$ by definiton, so that if $b$ is an inverse of $a$ then we can apply $b$ on both sides to obtain that $$ a=a(ab)=a^2b=ab, $$ so that $a$ must be the identity.
(I have not used commutativity, but I have used associativity to re-arrange the parenthesis. I'm not sure if my argument works without assuming associativity.)
Thus, any such operation must be the identity operation (i.e., the one that leaves everything unchanged).
That's the mathematical explanation, but it can also be phrased without using math. If you have an operation that doesn't change anything the second time you apply it, then if you have a way to undo that operation it means it can't have done anything the first time either.