Resonant intersubband polariton-LO phonon scattering in an optically pumped polaritonic device