No man is an island. There must always be a dependency on the outside world. But you can reduce risk by using commodified products.
Any for-profit company is highly incentivized to keep their products proprietary, locked behind copyright, obfuscation, etc, or even provided only as SaaS. They are also highly incentivized to avoid the negative attention of the governments of any of the countries they operate in, because their primary goal is to remain profitable.
Nonprofits do not have that requirement, and are much more likely to be able to attract people who are willing to defy oppressive, censorious, or outright fascist governments in order to continue to provide high-quality software & hardware to everyone without limitation or discrimination.