Understanding the influence of vibrational degrees of freedom on transport through a heterostructure poses considerable theoretical and numerical challenges. In this work, we use the density-matrix renormalization group (DMRG) method together with local basis optimization (LBO) to study the half-filled Holstein model in the presence of a linear potential, either isolated or coupled to tight-binding leads. In both cases, we observe a decay of charge-density-wave (CDW) states at a sufficiently strong potential strength. Local basis optimization selects the most important linear combinations of local oscillator states to span the local phonon space. These states are referred to as optimal modes. We show that many of these local optimal modes are needed to capture the dynamics of the decay, that the most significant optimal mode on the initially occupied sites remains well described by a coherent-state typical for small polarons, and that those on the initially empty sites deviate from the coherent-state form. Additionally, we compute the current through the structure in the metallic regime as a function of voltage. For small voltages, we reproduce results for the Luttinger parameters. As the voltage is increased, the effect of larger electron-phonon coupling strengths becomes prominent. Further, the most significant optimal mode remains almost unchanged when going from the ground state to the current-carrying state in the metallic regime.