Repairing or replacing a leaning retaining wall
If an old stone or block wall stands straight and only the mortar or face is worn, masonry restoration can usually save it. Once a wall leans or bulges, the cause is usually water behind it, and patching the face won't fix that, so I'd rebuild with drainage. A rotting timber or railroad tie wall I'd replace with block, because the block industry's manual says stacked concrete blocks resist cracking and won't splinter or decay the way treated wood does.

