Nonlinear stability in reaction-diffusion systems via optimal Lyapunov functions