IMPE, the most seasoned developers on the project (e.g.: ten years or more) had the experience, that comes with age in position, to know when redundant code was being made and they voiced such during code-reviews for pull-requests.
The intrinsic problem with this approach, of course, is that you need the people to stick around for this to work and to force code-reviews for check-ins.