Dynamical stability of a many-body Kapitza pendulum