This is a great comment! This is probably the best articulation of why
"good code is an asset, and it's a compounding asset, and the effect is exponential and not linear" - good insight, well articulated
"running IRR" - definitely right. I think you can apply different variables to the various categories of work.
Summarizing, the main thing, whether outsourcing or in-house is to find people who can write great code. On my end, understanding of the space you are in is very important as well