> In earlier times the Confucian pacifist ways of China
Imperial China was not pacifist. A basic model of Chinese history, which IIRC came from scholars in imperial China, was that China repeated a three stage cycle (from memory, the terms won't be exactly right): ascension (of a new dyansty) and prosperity -> decline and corruption -> chaos (and war) -> ascenscion ....
China's borders reguarly changed through force. Look up historical maps, for example. However, China had no peers in size and wealth nearby, and therefore didn't fight existential wars.
I'm not sure Confucian philosophy is pacifist, regardless.
> China were not up to the aggression of Western Europe, the US and Japan
They were not up to the technological advantages of the industrial revolution, and took a long time to recognize it and to change. In the early-ish 19th century, the Qing emporer wrote a famous letter to the king of England saying that China did not need their trinkets (industrial revolution technology) that the subordinate king (I forget how that was implied or expressed) offered, apparently not realizing the severe disadvantage. Even after the subsequent brutal, imperialistic attack on China, seizure of ports, and forced trade, the Chinese emporers tried to minimize change, IIRC first trying to just buy military tech without the infrastructure of knowledge, training, skills, etc.
Even today, the CCP seems to think it will have a wealthy capitalist country without a free market (which itself requires freedom and free thinking).