This is a complex question and one which requires an element of forecasting. To understand it more precisely, it is first necessary to ask what is meant by "a better trade agreement." It is clear that a good trade agreement for the United States is one which imposes the lowest and fewest tariffs possible (or ideally no tariffs) on American exports to China, to use the example given in the question. However, the obverse is not so straightforward. Tariffs on Chinese imports to America provide income for the U.S. government in the short term, but may harm the U.S. economy in the longer term.
In terms of intellectual property in general, the lower the tariffs on American products exported to China, the lower the risk of theft, since low or non-existent tariffs reduce the difference between the price of American originals and Chinese copies in the marketplace. In the specific area of technology theft, however, margins are often so high or the technology so superior to domestic alternatives that tariffs are unlikely to make much difference. A good trade agreement should therefore have strong sanctions against technology theft (and other intellectual property violations), but the value of such provisions depends on whether they are enforced rigorously or at all. On the American side it needs to be clear that products which result from technology theft will not be imported, and their importers and manufacturers will be subject to legal action.
Economic risks are not always clear, and risks are often necessary to make gains in any case. However, there is no reason to think that a better trade deal, both in terms of low tariffs for American exports and tougher action against intellectual property theft, would entail any greater economic risks for the United States. The gains, however, could be considerable, particularly if the government of China (or any other trading partner) can be persuaded stringently to enforce sanctions against technology theft. This is particularly true in the case of China, since Chinese theft of American intellectual property has already been estimated to cost the U.S. economy $300-$600 billion a year (article attached).