It also depends if the country has a realistic capability to catch up with their own tech. So for Congo it would probably be a bad move. China is a different story imho.
This is called "import substitution" and was incredibly popular in the age before neoliberalism. If your country is rich today you probably did a lot of that in the past.