That’s the same ‘logic’ as the infamous Cold War domino theory. Iran doesn’t share any land boarders with Russia or China. So they can afford to let Iran fall and not have terrorist training camps anywhere near their boarder. For China there is a minimum of two countries the west would need to get through to reach their boarders, so China has plenty of strategic depth to play with.
If the west continues to push further west and north after Iran, that’s when China and Russia will draw their lines, where geography, logistics, politics and time all works to their favour while the west is overstretched.
I would expect, in such a scenario, that China will start with covert assistance for Afghanistan, and overt military support of Pakistan if that fails and Afghanistan falls.
Pakistan will be China’s red line, where it would actually be prepared to fight directly if required. See how far that is from Iran?
But that’s also ignoring everyone else in the region. If the U.S. is hell bent on regime changing its way through Central Asia to get at China, you will see the SCO actually grow teeth and form a formidable opposing force to defeat the western approved headchoppers long before they even get to Pakistan.
Not to mention even newly West-installed/supported regimes can be incentivized to collaborate with China. The new Syrian regime, Iraq, and Afghanistan were all examples of this. In cases where the regime does not collaborate, China can then support alternative power centers in those countries, which are plentiful to be found. Iraq, Afghanistan, and Syria all proved that thesis and I would bet money on Iran landing the same way.
Are we going to wait for another Ukraine scenario to happen before they should react? Much more resources will need to be diverted to counter Middle East 2.0 instead of propping up Iran with minimal resources.
And how is this any better than sending some material aid (not direct military) to Iran and keeping them alive? Instead of letting Iran spend their money to keep foreign sponsored terrorists at bay. You propose that it should be China and Russia who spends billions to keep those terrorists contained.
You're assuming China isn't already or wouldn't (upon "unofficial" official request) send any dual use products to Iran. And then you're conflating Ukraine with (potentially) Afghanistan, Pakistan, Tajikistan, or Kyrgyzstan. Russia's frontier with Ukraine is plains and forests to my understanding. China's western frontier is separated from its neighbors almost entirely by mountains, completely unsuitable for heavy armor, trench warfare, or offensive artillery warfare.
The very limited national crossing points are bottlenecks that can easily be turned by China into defensive artillery/drone kill zones, given superior military technology (especially drone, anti-drone, artillery, and light armor), superior volume of firepower (through sheer industrial capacity), significantly higher altitude on the Chinese side, and superior manpower. PLAGF can very much find a new lease on life if mobilized for defense of the frontier.