That's correct, also just like how the Northeast, Xinjiang and inner Mongolia was not part of Ming China or most of China's historical territory, and how Okinawa and Hokkaido was not part of Japanese territory until the 19th century, ditto Hawaii for the USA. Taiwan is a relatively recent addition to the sinosphere of around 300 years, with a 50 year break during Japanese conquest, but still has a longer history than that of the United States as a nation.
However, what do you think would happen if there would be another civil war in America, and the losing party flees to Hawaii. Would the winner on the American mainland leave Hawaii alone?
Taiwan can indeed become independent by taking advantage of political divisions within China, foreign backing and win a war, like Outer Mongolia and Vietnam did (more than one war in Vietnam's case), but right now the Chinese civil war is still in progress.
And if Taiwan wants its independence to be acceptable, it must accept to not become a threat to mainland China, like Canada to the US. If it embarks on a hostile trajectory and threatens to blow up the Three Gorges dam on a whim, then it does not get the privilege of being ignored. Some countries have been invaded for much, much less in very recent history.
For your second paragraph what-if, there are too many variables, so not going into that.
Yes, that's true about about Hokkaido, Hawaii, Okinawa, and many other parts around the world where territory has changed and gone back and fourth.
Chinese Civil war can end the moment Taiwan freely changes its name from ROC to ROT. The majority of the population don't view themselves as "Chinese" but view themselves as "Taiwanese". History when it was part of Qing (time with Ming was really just a small section of the island) was not regarded well and is ridden with a history of rebellions.
How is Taiwan a threat to China? In all honesty, there's certainty that Russia or the US have in the back closet drawings of prime targets in China in case red alert has to happen. And I'm sure China has the same sort of plans for either Russian or US targets as well. And it was like that throughout the Cold War with US and Soviet tactical and strategic nuke targets littered all over Europe. So there's nothing unique about Taiwan putting the dam as a target.