Let $X$ be a closed Riemannian manifold and consider the function $f_n : X \times \cdots \times X \to \mathbb{R}$ where the domain of $f_n$ is the $n$-fold cartesian product of $X$ and where $f_n(p_1,...,p_n) = \sum_{i \neq j} d(p_i, p_j)$ where $d$ is the distance function on $X$. The function $f_n$ is invariant under the action of the isometry group $G = \text{Isom}(X)$ on the $n$-fold product $X^n$ as well as the action of the symmetric group on $n$ letters $S_n$ acting on $X^n$ by permuting the factors
Are the maxima of $f_n$ on $X^n / (G \times S_n)$ isolated?
As an example, this is the case for $X = S^1$ where the maxima is unique and achieved by the regular $n$-gon. My initial inspiration was that I was considering this question for $S^2$ with the round metric (where I have a feeling the answer is well known and I suspect the maximum is unique, but I do not know and would appreciate a reference if anyone knows -- here as an older paper of Berman and Hanes with some estimates of the maximum value in this case which have subsequently been improved upon).