Slow electron-phonon relaxation controls the dynamics of the superconducting resistive transition