We are not talking about an invading army using nukes in Taiwan, in which case would trigger MAD or at least a strategic "escalate to deescalate" strike on a US core city/military base.
China detonated a lot of tactical and strategic nukes in Lop Nur and other places. A nuke does not care if it's dropped on a testing range in Xinjiang or a stronghold in Hualien. The amount of poisoning to the whole Chinese nation is equally negligible in both cases. Legally there is no difference either.
Given that Taiwan is a battleground that US have spent a lot of time infiltrating, China should be realistic that certain contamination can happen within Taiwan province only. We would ideally not allow any part of the country to be hit by toxic munitions, but similar to the Donbass or Crimea debacle faced by Ukraine, we must acknowledge the realistic facts on the ground, that repulsing the occupier is more important than containing NBC effects.
On the other hand if ground on the mainland is attacked by toxic weapons, China's most logical reply would be to go after cities in the country that provided the base with DU cluster munitions, white phosphorus and the like, this would be an incredibly strong deterrent against spreading the war to the mainland.
We both have enough weapons to take eachother out several times over. But China does not have true escalation dominance which would entail being able to survive an all out nuclear attack while destroying them. The key to achieving this would be increased missile defense technology and more anti nuclear shelters/bases.
While China has the resources to pursue the path of nuclear escalation dominance, I don't expect it to pay off in the immediate future.
What would be irresponsible is to disregard planning for extreme options in the face of operational failures. This is the way of the US military, which just changes the parameters of exercises when the result does not suit them, so that their primary purposes becomes political performance to assuage the public that they have an "ever victorious army".
Again, nuking Lop Nur did not spread any fallout to cities such as Chongqing which are equidistant from Lop Nur as some areas in Taiwan are to major coastal cities. The talk about fallout is fear mongering by anti nuclear activists.
It is far from an ideal scenario to have to employ nukes in Taiwan defense plans, but it should be acknowledged as a necessary and legally possible fallback option.
Consider the following scenario. PLA intercept the plan of KMT forces to gather up hundreds of supersonic missiles and 1000s of shahed type drones. The probable target is a dam in Fujian, which if destroyed will force the relocation of several hundred thousand. The air force is put to work on destroying the launchers, but they prove evasive. Although China has preevacuated the most risky areas and air defenses worked relentlessly to bring down many 1000s of targets, although <1% of the projectiles slip through, some fall on populated areas, and some inflict damage on the dam, which causes now several thousand properties to be flooded.
Meanwhile, Americans are mobilising a massive invasion force, whose targets are as of now still unknown to China, but it's believed that they can absolutely overrun parts of Taiwan or maybe Chinese holdings in the SCS.
What will be the logical response here? A nuke over Hualien would reply the losses of 100s civilians on mainland with high 1000s of KMT fighter losses, invaluable destroyed enemy hardware including fighter jets, and possibly collateral punishment on 1000s of civilian occupiers complicit to the deadly dam attack.
Furthermore, such a move may have the bonus of instantly cauterizing the wound in Taiwan by means of overwhelming fear among the anti government fighters, allowing PLA to focus 100% on the US forces.
It is an option that should absolutely remain on the table.