The threat of nuclear war goes both ways: the impact of nuclear on discouraging the defence of Taiwan is equally applicable on discouraging the invasion of Taiwan.
No one is having a nuclear war over Taiwan. It's important, but not that important.
If China invaded Taiwan, the US would not defend it. Super powers don't go to war. They have wars through proxy countries. If super powers did go to war, it would be nuclear war, and it would be bad.
For what it's worth, the invasion of Taiwan is considered by military planners to be an important flash point for World War 3. It would be bloody, and very likely nuclear, and pull in nearby nations like Japan, and will likely end with hundreds of millions (possibly billions) dead.
Not by USA or other allies. However, the Taiwan military could make it painful for the mainlanders. Or, the right bribes to the right officers might grease the skids.
However, this is thinking like American leadership: too short-term. What happens the day after China controls Taiwan? Do all Taiwanese meekly submit to their bullshit? Or do they become an extreme version of Hong Kong? It's mostly Han in Taiwan, so the depravities seen in Xinjiang and Tibet couldn't be instituted there without jeopardizing the legitimacy of the entire state. As long as Chinese leadership is fairly secure in their positions, they won't invade Taiwan.
Hong Kong's population is less than a third of that. Somehow they've given Beijing a bloody nose for nearly a year now. That's not surprising, because mainland China's population is irrelevant to this question. What are they going to do? Give a bunch of farmers hukou to Kowloon and Taipei? ...actually, that's a fun idea, but it's unlikely to decrease public unrest.
If China invaded Taiwan, the US would not defend it. Super powers don't go to war. They have wars through proxy countries. If super powers did go to war, it would be nuclear war, and it would be bad.