The Chinese supply chains that eventually build the iPhone grew from economic development zones in the 80s. India isn't starting from zero, but it's also not going to replicate that within a decade. Assuming it could - we don't know if democracies can direct capital development the same way authoritarian state capitalism could. I think India should be fine, at least in the short term, if only because Chinese manufacturing want to migrate to ASEAN. It benefits their bottom line. However, there's also the possibility that China will spin up African manufacturing before Indian industry can inherit the role.
China is working to escape middle income trap, their goal is to shift into higher paying domestic consumption + services which means inevitably shifting manufacturing out of the country. They are already experiencing labor shortages due to high wage, and combined with efforts to reduce pollution the government and business owner interest are aligned. Keep in mind most of the factories Chinese owned, they have incentive to offshore their business to where labor is cheap, currently that's in adjacent ASEAN countries that's relatively close to Chinese logistics chain.
As for Africa, they're already paying for the infrastructure, if resources is near by, it makes sense to consolidate manufacturing. And geopolitical it's preferable to boosting the development of India, an immediate regional competitor. Also Africa is fragmented and easier to negotiate with, have similar demographics to India (lots of young), more willing to learn mandarin. Alternatively, we're not even sure if massive manufacturing nations are viable with automation. Regardless there's