SHANGHAI — As a candidate, Donald J. Trump aimed some of his most blistering words at China, declaring that “we already have a trade war” and suggesting ominously that “we have the power over China, economic power.”

As president of the United States, Mr. Trump can use trade — a cornerstone of his populist rise — as a weapon, with the potential to drastically reshape the world’s two largest economies, as well as the companies, industries and workers who depend on their hundreds of billions of dollars in closely linked goods. But neither side may win.

Cutting off trade will not bring back the bulk of American manufacturing jobs lost to China in previous decades as it became the world’s factory floor. Already, some industries that left the United States years ago, such as garment making and some light manufacturing, are now leaving China for even cheaper places. An aggressive stance with China also risks antagonizing an authoritarian government with its own brand of economic nationalism.

Yet the unsettling reality for Beijing is that Mr. Trump has a variety of ways to get back at China for trade practices that he, his supporters or people in the affected industries view as unfair. China sells a large array of goods to the United States that he can aim at for higher tariffs.