We investigate the scattering of an electron by phonons in a small structure between two one-dimensional tight-binding leads. This model mimics the quantum electron transport through atomic wires or molecular junctions coupled to metallic leads. The electron-phonon coupled structure is represented by the Holstein model. We observe permanent energy transfer from the electron to the phonon system (dissipation), transient self-trapping of the electron in the electron-phonon coupled structure (due to polaron formation and multiple reflections at the structure edges), and transmission resonances that depend strongly on the strength of the electron-phonon coupling and the adiabaticity ratio. A recently developed TEBD algorithm, optimized for bosonic degrees of freedom, is used to simulate the quantum dynamics of a wave packet launched against the electron-phonon coupled structure. Exact results are calculated for a single electron-phonon site using scattering theory and analytical approximations are obtained for limiting cases.