Wouldn’t China be better off if it had the same type of relationship with Taiwan: as Germany has with Austria, or the UK has with Ireland?

In short just be nice.

Thanks to free trade you don't need the same government to work together.

War is terrible and by threatening it on a small neighbour, China hurts its reputation.

In terms of secession, the ROC didn’t secede from the PRC. The outcome of the Chinese Civil war in 1949 was that the PRC effectively succeeded from the ROC.

Here is another way to look at it - Germany and Japan have done far better since the end of WW2 because they didn’t bother trying to gain back territory they used to control that didn’t want to be part of their modern country. Can you imagine the wasted opportunity for Germany or Japan if it had spent 75 years threatening its neighbours with war to recover lost territory. Could you imagine the waste if the UK refused to accept the Independence of the USA or Ireland, compared to what they have been able to achieve together as independent Nations.

It is also worth pointing out West Germany got East Germany to join it, by being a free democratic nation they wanted to join (through a peaceful democratic process).

If China normalised its relationship with an independent Taiwan it would not only benefit materially, it would reassure other nations and allow China (the second largest economy in the world) to become a more welcomed leader of the world.

Its also worth putting into perspective that one of the results of the 1917-1919 Russian Revolution, that brought the Communists to power, was the independence from Russia of: Finland, Estonia, Latvia, Lithiania, and Poland. Taiwans independence following the Communist victory in mainland China is not unique.

And further to the perspective angle, Ireland was controlled by England for an over 500 years longer than China controlled Taiwan, and Ireland composed a much larger part of the UK than Taiwan did in China.

In the British American Revolutionary War the USA Republican Revolutionaries were not able to conquer the part of British America that became Canada - they didn’t spend 75+ denying British Americans existence and threatening war on Canada to recover the part of British America they weren’t able to conquer in their rebellion.