Interestingly enough, when I was working with JavaScript and PHP, this was very common. Companies that like to "own" their employees, remote work was seen as bad, flexibility was zero. Then I moved away from the mainstream tech, and I no longer have any of this. I'm now treated with respect, I get paid well, I'm 100% remote for many years already. It's funny how companies take you for granted when they can replace you within a day, and treat you well when they can't. That's why I recommend people to take up something that isn't done by a lot of people.
Oh and, as an Estonian myself, I do not recommend e-residency. If all you want is a company, then the e-residency is one of the worst ways to go about it. In terms of cost, flexibility, taxes, etc.