Transient energy relaxation in scattering-assisted terahertz quantum cascade lasers