Till the 1700s India was the largest economy in the world, with China being a close second, based on the chart below, which in turn cites British economist Angus Maddison as the source.
https://www.visualcapitalist.com/2000-years-economic-history...
So why wouldn't India be able to reproduce China's success? Maybe not in the next 20-30 years, but it sure isn't a foregone conclusion that India will always remain poor.