I think what you're saying is true, but a slightly broader issue around why software development is difficult more generally.

What I'm touching on here is more related to how outsourced teams typically lack the ownership and motivations that internal technical teams will generally have.

The specifics will vary depending on the outsourcing model, but outsourcing to a remote software development agency is typically the worse of all possible options. The reason for this is that code quality and maintainability is rarely ever a priority for an agency because they're typically judged purely on whether they can deliver what they promised to the client on time. It's very hard to tell a client that a feature is coming 3 months late and will cost extra, but that time is needed to ensure the developers are happy with the code quality.

Additionally, if there are any bugs that's often a good thing for a software development agency because not only will you now be paid for the initial feature development, but you'll also be paid for any subsequent bug fixes.

If outsourcing is done directly then the results are typically better because the remote team tends to have more agency. The business might still ask for a feature as soon as possible, but now the remote team isn't going to receive extra work for bug fixing the crappy code they deliver. They also don't have multiple clients and are going to be working solely on that single codebase so can't just hand off any issues to the next guy who comes along. With direct outsourcing the incentive to deliver crappy code no longer exists so typically the quality increases. Additionally the business might trust the remote employees enough to judge their own performance for which they can include NFRs instead of judging performance purely on the speed at which features are delivered.

However, even if directly outsourcing employees are rarely seen as equal to other employees at the company. The business basically just sees them as cheap code monkeys and the code monkeys know that's all they'll ever be too. Employees working at head office on the other hand might be motivated to go above and beyond because they want to be recognised by their bosses, and if they do a good enough job they might even get a promotion. This just never going to happen to a code monkey in India who can barely speak English no matter how competent they are.

Additionally, a team at head office is also likely to have more influence on business decisions and be able to feed technical input into the decision making where useful. This increased influence also means employees are more likely to care about the company since they feel closer and more involved in decision making.

The reason outsourced teams are bad isn't necessarily because they're not hiring enough 10x developers (although they're often not incentivised to do that either), it's more that there's usually little real reason for anyone to produce anything of quality. No one is going to be promoted, no one has any influence, developers are mostly just being judged on how fast they can deliver features because that's the only metric non-technical individuals can assess their productivity by, and finally they're disconnected in just about every possible way (location, culturally, hierarchically, etc).

I think what might work is have a great development team in house who can make all right high level technical calls, then outsource the grunt work while assessing them both on speed and on quality. A almost every company I've worked for there are talented people wasting time on nonsense like bumping project project dependencies and replacing deprecated code. I'd guess that work could be outsourced with near-zero downside and a significant cost saving.