I too have been in software development for 20+ years.
The most effective thing we can do to write better software is to get good rest, reduce stress in the work place, and learn to write and communicate effectively. After that comes skills with the tools and processes around writing software: technical, mechanical skills that can be taught and managed.
You need a mix of people from different skill levels to make an effective team. "Amateur," or "junior," or whatever you classify folks with less experience as bring a lot of energy and enthusiasm to a project. They're often eager to learn and many don't know what isn't possible yet and bring fresh ideas to the table (not every idea is a good one but it's nice having folks on your team who are keeping everyone out of a rut). On the opposite end I don't think you can have "senior" or "professional" developers without anyone to mentor or train and work with. In order to solidify your understanding of a topic you have to be able to communicate it to an audience with less specialization and understanding than you. Knowledge takes time to develop into facts we can take for granted.
Update: If you're interested in empirical evidence of the effectiveness of various software development practices, a handy, light resource: https://www.hillelwayne.com/talks/what-we-know-we-dont-know/
tldr; very few practices we eschew as a professional obligation, like being diligent about writing unit tests, have little evidence to support their effectiveness in reducing errors. The things that do work: sleep, low stress, writing, and probably code review.