Is there a name for this form of sampling? I had an idea to combine oversampling and undersampling in the following way:

Compute the average number of individuals in each class. For classes with a number of individuals greater than this average, undersample the class so that the number of individuals in this class equals the average. For classes with a number of individuals lower than this average, oversample the class so that the number of individuals in this class equals the average. Overall, all classes then have a number of individuals equal to the original average.

However, I cannot see any literature on this idea. Does this idea exist and does it have a name so that I may read about it?
It is called resampling and is quite famous for dealing with imbalanced datasets. See, for example, https://www.kaggle.com/rafjaa/resampling-strategies-for-imbalanced-datasets for implementation.

Congrats on good intuition!