Assuming Japan has nukes, they would only use them as a last resort should China attack them directly. No way would they be used in defense of Taiwan, that would just invite China to use their nukes against Japan.
Why do you believe Japan would let Taiwan stand alone?
Japan knows they will be next in the chain that the CCP hits:
Hong Kong
Taiwan
Japan
South Korea (maybe jointly via North Korea)
The Phillipines
Australia
India
The CCP will continue to push.
Anybody’s nukes on Taiwan will be immediately met with a Chinese Missile Crisis just as deadly serious as the Cuban one. Most likely the Chinese would attack preemptively. This is the particular DC CF most likely to get us all killed.