Japan in 1940 was a very different beast to Japan in 1950, and it would be misguided to think Japan would launch another war in the 1950s just because "they" recently did that. "They" (values, democratic governance, free press, etc) change over time. You should go straight to an analysis of the values and system of the current people that live there, instead of whatever their ancestors did.
If a country starts talking like Japan did in the 1930s, even if they have no history of war, then I will assign a high probability that they will start behaving like Japan of the 1940s. They are humans just like the Japanese were humans and will produce the same behavior given the same bad ideas and circumstances.
Modern China is a revisionist power (much like Russia) with the capability to challenge the US. For these reasons, them launching an invasion of Taiwan is plausible. It is against their economic self-interest, but that doesn't completely deter nations from launching wars. National security concerns and national pride can trump economic concerns.
(1) What if China were to believe the war was "winnable" eg, they could take over so quickly due to overwhelming military power or due to being welcomed by some of the population or something, as to avoid huge damage. Then it wouldn't matter. BTW, this is what is meant by "deterrence", and in US domestic policy, the china-related fearmongering is clearly aimed at increasing deterrence.... which could only possibly decrease the chance of conflict even more, so what's the problem?
(2) What if China's leadership were to believe a distraction is necessary from domestic politics? Then, also, these mutual investments wouldn't matter.