We present a method for simulating the time evolution of one-dimensional correlated electron-phonon systems which combines the time-evolving block decimation algorithm with a dynamical optimization of the local basis. This approach can reduce the computational cost by orders of magnitude when boson fluctuations are large. The method is demonstrated on the nonequilibrium Holstein polaron by comparison with exact simulations in a limited functional space and on the scattering of an electronic wave packet by local phonon modes. Our study of the scattering problem reveals a rich physics including transient self-trapping and dissipation.