Correlation-causation. Are you saying Chinese allies being failed states is because China makes poor choice of friends or that China's incompetent handling of foreign affairs turns countries into failed states?
Since this whole discussion is starting with what's going in Russia, how was/is China in any position to influence Russia? We're not talking about Cambodia here, we're talking a country with 15,000 nukes that was considered one of the world's great powers prior to the war and China's military superior. Even the Soviet Union couldn't order 1960s-1970s China around, despite the massive power disparity.
If Putin had dreams of becoming the 21st Century Peter the Great there was nary a thing China could do other than compel Putin to give them the head's up that war was coming. Now that Kremlin intrigues are out in the open, short of a disintigration of Russia's territorial integrity what's China to do? Surely its not working out a deal for the PLA to become Putin's equivalent of the Varangian Guard right?
With respect to China's allies being poor countries, you make do with what you have and if you understand history how can any of it be blamed on China? America as a relatively young modern country with a European heritage and emerging from WW2 unscathed had the luxury of a prime position to ally itself with all the world's advanced economies. China was, well we all the know the story, so for brevity's sake I won't repeat it. In recent history the advanced powers were willing to reap the benefits of Chinese cheap labor, but hardly willing to trust it considering its history and government, so China made due with the global south.
Most of the global south is in a sorry shape due to the legacy of colonialism, that's not exactly something China can change or influence. It'll do business, but its not like China can magically wist away the corruption and factionalism. "Yeah, but the U.S. helped Taiwan and SK go from states where most of the citizens had to eat grass, to becoming first world nations, so why can't China?" US had the luxury of working with nations with a strong Confucian culture and homogenous populations. The rest of the global south is a messy mixmatch of caste hierarchies, colonial borders, and tribal interests. Much like its own development, China got dealt with a less than ideal hand and made due with what it had, in some cases it is playing as well as it can.
If countries won't ally with China because every country that does "becomes a shithole," while people would rather align with the US because they can become like South Korea. Well, Latin America has been America's "backyard" for over 100 years, they're still waiting on Uncle Sam to make them wealthy as South Korea. But Uncle Sam never did and that's why they prefer China nowadays.