In Weyl semimetals the application of parallel electric and magnetic fields leads to valley polarization -- an occupation disbalance of valleys of opposite chirality -- a direct consequence of the chiral anomaly. In this work, we present numerical tools to explore such nonequilibrium effects in spatially confined three-dimensional systems with a variable disorder potential, giving exact solutions to leading order in the disorder potential and the applied electric field. Application to a Weyl-metal slab shows that valley polarization also occurs without an external magnetic field as an effect of chiral anomaly "trapping": Spatial confinement produces chiral bulk states, which enable the valley polarization in a similar way as the chiral states induced by a magnetic field. Despite its finite-size origin, the valley polarization can persist up to macroscopic length scales if the disorder potential is sufficiently long ranged, so that direct inter-valley scattering is suppressed and the relaxation then goes via the Fermi-arc surface states.