Factory activity in China shrank in August for the fourth month in a row as the United States ramped up trade pressure and domestic demand remained sluggish, pointing to a further slowdown in the world’s second-largest economy.