As the U.S. and China weaponize trade, middle powers like Japan are pioneering a new model of economic security.