A quantitative theory of electron-phonon interaction in the two-dimensional electron gas in a quantum-sized film with the hyperbolic P¨oschl–Teller confining potential has been developed. Analytical expressions for the transition probability are derived in the case of electron scattering by deformation-induced acoustic, piezoacoustic, and polar optical phonons. The results obtained for various scattering mechanisms in the film are compared with the results obtained for bulk crystals.