We study two identical fermions, or two hard-core bosons, in an infinite chain and coupled to phonons by interactions that modulate their hopping as described by the Peierls/Su-Schrieffer-Heeger (SSH) model. We show that exchange of phonons generates effective nearest-neighbor repulsion between particles and also gives rise to interactions that move the pair as a whole. The two-polaron phase diagram exhibits two sharp transitions, leading to light dimers at strong coupling and the flattening of the dimer dispersion at some critical values of the parameters. This dimer (quasi)self-trapping occurs at coupling strengths where single polarons are mobile. This illustrates that, depending on the strength of the phonon-mediated interactions, the coupling to phonons may completely suppress or strongly enhance quantum transport of correlated particles.