Unlike the oil dependency system, where there's actual scarcity of the thing you need (oil), there's nothing special about building solar panels that locks you to China. Basically any country could build it, but they need to figure out how to build stuff in general (as opposed to outsourcing like the last three decades)
Solar panels are oil drills, not oil.