Put aside Pakistan for a second, your reply is telling that even you don't have confidence in Iran achieving the two things I mentioned.
Do reflect on one fact, the things I said is not just for China's willingness to share technology, the things I said is crucial for Iran's own survival. In today's world, can Iran really survive by being strategically indecisive? With internal political divide that hamper every single foreign policy they make? With foreign infiltration so deep that easily wipe their entire high command seemingly at will?
If Iran has no confidence in it's own survival then why would China invest in it? All that strategic alignments you speak of would be for naught if the regime kick the bucket.
Now talk about Pakistan. The current Pakistani government is US installed stooges I've said so in the past, the thing about Pakistan is that no matter their relation with the US is, They will always be anti-India and somewhat pro-China. This is the kind of stability China can count on.
Secondly, at least Pakistan is somewhat competent in their military intelligence that they're not infiltrated to the extend Iran is. The level of infiltration in Iran is frankly UNBELIEVABLE, if anyone told me Iran is this infiltrated two years ago I'd laugh at them.... yet here we are
If Iran was on the verge kicking the bucket, Israel and US wouldn't need to Bomb it now, would they?
Israel and US felt the need to do it cause they have no leverage left against Iran. They tried sanctions for decades and that didn't work. They tried heavily during the Mahsa Amini protests to topple the Regime, but that didn't happen.
So, they ended up trying to decapitate the leadership and hope if that works. But guess what that didn't work either.
Iran is a regime that came from a revolution. A revolution that kicked out an old regime of pro-western elites and replaced by a more egalitarian populist govt. Kinda similar I would say to communist revolutions. Yes, their ideology is religion instead of Equality for All, but the actual outcome is kinda similar.
You have an org like the IRGC that is similar to something like the PLA, a party army.
So, I think Iranian Regime is very resilient. Yes, its unpopular to the elites, that's why you have all these spies. But I don't think the common mass is okay with a pro-western, pro-elite govt similar to what Gulf Arabs have. Those gulf arab govts are also extremely unpopular by the way.
The kind of Ideology that Iran espouses, about revolution and islam, makes it very hard for them to openly justify too much dependence on a foreign country like China or Russia. So, that's why you see Juche like self-reliance policies. I think that is bigger impediment to China/Iran relationship rather than regime stability. There is also another factor which is China not wanting to make enemies out of Gulf Arabs and the west. China chose to stay out of Iran because of these other countries.