We analyse the effect of a strong perpendicular magnetic field on an intersubband transition in a disordered doped quantum well strongly coupled to an optical cavity. The magnetic field changes the lineshape of the intersubband optical transition due to the interface roughness of the quantum well from a Lorentzian to a Gaussian one. In this regime, a novel form of magnetic-field-induced cavity protection sets in, which strongly reduces the polariton linewidth to the cavity contribution only. Implications of our results for fundamental studies of nonlinear polariton dynamics and for technological applications to polariton lasers are finally highlighted.