  Some Jupiter-mass exoplanets contain $\sim$$100\, M_\oplus$ of metals, well
above the $\sim$$10\, M_\oplus$ typically needed in a solid core to trigger
giant planet formation by runaway gas accretion. We demonstrate that such
`heavy-metal Jupiters' can result from planetary mergers near $\sim$10 au.
Multiple cores accreting gas at runaway rates gravitationally perturb one
another onto crossing orbits such that the average merger rate equals the gas
accretion rate. Concurrent mergers and gas accretion implies the core mass
scales with the total planet mass as $M_{\rm core} \propto M^{1/5}$ - heavier
planets harbour heavier cores, in agreement with the observed mass-metallicity
relation. While the average gas giant merges about once to double its core,
others may merge multiple times, as merger trees grow chaotically. We show that
the dispersion of outcomes inherent in mergers can reproduce the large scatter
in observed planet metallicities, assuming $3-30\, M_\oplus$ pre-runaway cores.
Mergers potentially correlate metallicity, eccentricity, and spin.
