Unless I'm seriously underestimating the stupidity of the entire Japanese leadership, Japan would not directly intervene as well. The Japanese military top brass, and the National Diet should attempt to stop the LDP's drive to go to war with China. Nevertheless, I could still see Japan playing a similar role like Poland in the Russo-Ukraine conflict. Japan could accept the DPP escapees and Taiwanese refugees. Japan could act as a proxy for the US to attempt to provide military aid shipments to Taiwan. But doing so by sea compared to a land border is a whole different type of challenge. Very doubtful that it could be done, but I'm sure that the US and Japan will try. Japan could throw all kinds of sanctions and boycotts on China. But the economic costs will be disastrous for Japan too.