Higher-order geodesic deviation for charged particles and resonance induced by gravitational waves