From a strategic perspective, China's best strategy is to “allow Israel and the United States to control the entire Middle East.”
I know this sounds cruel, but it is indeed the most advantageous strategy for China.
Israel/the United States has fundamental, irreconcilable cultural conflicts with the entire Middle East region. They can destroy the armies and governments of Middle Eastern countries, but they cannot eliminate all the people of the Middle East. If Israel/the United States were to completely control the entire Middle East region, they would be completely bogged down in an endless people's war. The U.S. war in Afghanistan is a classic example.
Of course, during this period, China can moderately provide some support to intensify the confrontation between the two sides. But China does not need to directly intervene.
Instead, China can continue to develop its national strength and military power. At the appropriate time, it can use both economic and military power to directly target the United States.