Stochastic optimal control for nonlinear damped network dynamics