Maintain constant total amplitude of sum of sines
Hopefully this will be some help.

As you have stated it, this is a difficult problem to formulate and thus get an analytical solution.  First, are you talking continuous or discrete?  Makes a big difference.

Anyway, you want to formulate it as an optimization problem.  Something like "minimizing the RMS" can be expressed as an evaluation function.  "All the peaks having the same amplitude" means have to measure the value of the function with the condition applied to the derivative (=0).  So, your evaluation function (a function of your free variables) could be something like:

$$ F(\phi_0,\phi_1,\phi_2,...,\phi_{N-1}) = \sum_{p=1}^{P} \left( f(t_p) - \bar f \right)^2 $$

Where $f(t)$ is your function, evaluated when $f'(t)=0$, and $\bar f$ is the average height of all those peaks.

This evaluation function is going to be periodic in all dimensions.  There are going to be lots of local minima.  Your only recourse (as I can see it) is to do a coarse sweep of your whole domain, then a local optimization search on the best candidates.