Starbucks Corp. has agreed to sell a 60% stake in its China business to Boyu Capital for $4 billion, aiming to enhance operations amid competition from local brands.