Determination of optimal vaccination strategies using an orbital stability threshold from periodically driven systems