should also let outside help come when the need arises.expose your “non-expert code” to the software engineering communities (and all other associated fields) to take a look.
1. Software engineers are expensive. Hiring them to write your code is how you end up needing even more money to do your science, and I think the software engineering world if anything can appreciate prioritizing being scrappy to get more done.
2. Open source is slow and doesn't produce consistent results in the timeframes you need in order to get things implemented in one-offs. In fact, the value you get from others looking at your code is pretty anemic unless other software engineers find your code useful, at which point they have real incentive to help you improve existing functionality instead of reinventing the wheel. I do think code should be published alongside papers as a matter of reproduceability, but I don't think opening up the code beforehand will accomplish much.
Which is all to say that while I agree with you in principle, I don't think your recommendations are practical.
I think this letter has it right: we should make better tools to help non-experts do less foot shooting. C++ is very, very foot shooty, and the usual answer of "well get better at C++" is a non-starter for non-experts.
I think there are other solutions too - software engineers with partial specializations in academic fields, volunteers, etc.