This generalization is called a ternary commutator, and there are $n$-commutator generalizations, as explained here:
Carlo Beenakker
- 188.1k
- 18
- 448
- 651