  We establish Lipschitz regularity of harmonic maps from $\mathrm{RCD}(K,N)$
metric measure spaces with lower Ricci curvature bounds and dimension upper
bounds in synthetic sense with values into $\mathrm{CAT}(0)$ metric spaces with
non-positive sectional curvature. Under the same assumptions, we obtain a
Bochner-Eells-Sampson inequality with a Hessian type-term. This gives a fairly
complete generalization of the classical theory for smooth source and target
spaces to their natural synthetic counterparts and an affirmative answer to a
question raised several times in the recent literature.
  The proofs build on a new interpretation of the interplay between Optimal
Transport and the Heat Flow on the source space and on an original perturbation
argument in the spirit of the viscosity theory of PDEs.
