Technically possible, but politically and strategically massively stupid to do so.
Right now, everyone blames the closure of the Gulf on the Americans and Israelis. If China were to open up a safe passage just for Chinese ships, then immediately the western MSM will seize on that to spin it as evil China being selfish and not reopening the gulf to all. And suddenly all the pressure will be on China to grant safe passage to all or damage relations with every country China doesn’t cover. The very definition of a no-win situation.
Besides, China is far better prepared than the west to weather the coming storm. It has significant domestic production, vast reserves, and most crucially, direct access to full Russian supplies.
China can easily accommodate the reduced supplies from the ME more or less indefinitely with modest consumption and export changes (like the ban on exports of diesel and gasoline) because it has purposefully built its economy that way in anticipation of being cut off from ME supplies in the event of a war over Taiwan or Japan.
There is zero need for China to take any such action and it will not take any such action as a massive oil shock to the world from this war of aggression by America and Israel only serves to advance Chinese interests one way or another.
I think you're being a little too simplistic in your thinking. This could be the start of a racket. China could refine the petrol and resell it at a premium to preferred partners. Some of the profits can be recycled back to Iran. The gulf states as well as Russia can charge a premium to cushion the blow from reduced volume and sanctions respectively.
If you look at the end results compared to the status quo
Net positive: China for stable supply and profits. Iran, for getting a share of the profits for not really having to do anything.
Net slight negative: GCC for the reduced volume, China/Iran friendly countries for higher prices but stable supply.
Net major negative: China unfriendly countries for both limited supply as well as massively higher prices.
The first step for China is instituting export controls, which it has already done. After some time of no supply and sky high prices, the status quo for most countries will be much worse than currently, thus making the aforementioned "end scenario" more appealing, even for most of the "net major negative" countries as they can ameliorate the situation by cozying up to China and Iran, even if only with diplomatic support.