You could say the same about every developed nation. It took a bit more for most nations, but these nations had to literally invent concepts like public health and education, welfare and even socialism.
But yeah, every western European country has already eliminated the worst kind of poverty and on average European citizens are better off than Chinese citizens. Working conditions, working hours and safety laws in Europe are much better than the Chinese average.
The US is doing its own thing with extreme capitalism, and I’m against that, but let’s not kid ourselves, China has taken a lot of pages from the US’s economic model
European workers didn’t get their rights from being imperialist, they fought hard against the imperialist elites to get where they are now, and China’s elites are being just as imperialist today as any European or American elite has been since forever.
China and India is apples to oranges. There are a myriad of reasons why their paths diverged. There are other East Asian countries that did better than China way before China, while starting from a much more similar point (or even a worse point).