Outsourcing is always better in terms of optimizing taxes and saving on social contribution payments (not that you shouldn’t pay it, but it is a good option for young companies who does not have any steady profit yet).
Also, in a post-covid world distant work will be even more popular, so you definitely should look into that option and outsource.
You hire only when it is absolutely necessary, when you need to have control over work right here, right now. If you are a software development company, it is wise to have your lead software developers in-house, especially when your project may have bugs, it crushes too often and thus requires constant attention.
Bottom line: outsource as much as possible, but keep the most important work in-house.
I run https://sapiox.com