Electronic and lattice temperatures of terahertz quantum cascade lasers based on phonon-assisted depopulation