You've left out a few facts. China's policy of only accepting silver as payment for tea opened a market opportunity for drug smugglers who would only accept silver for opium. Capital flows had to balance.
The Chin dynasty was rotting from within and when their tired feudal system went up against neo-capitalism, it collapsed. A young capitalist system is extremely predatory. Just ask the current Chin we and Russian governments for references.
The western politicians were buffoons like most politicians today and went along for the ride.