  Observed rotation curves in star-forming galaxies indicate a puzzling dearth
of dark matter in extended flat cores within haloes of mass $\geq\!
10^{12}M_\odot$ at $z\!\sim\! 2$. This is not reproduced by current
cosmological simulations, and supernova-driven outflows are not effective in
such massive haloes. We address a hybrid scenario where post-compaction merging
satellites heat up the dark-matter cusps by dynamical friction, allowing
AGN-driven outflows to generate cores. Using analytic and semi-analytic models
(SatGen), we estimate the dynamical-friction heating as a function of satellite
compactness for a cosmological sequence of mergers. Cosmological simulations
(VELA) demonstrate that satellites of initial virial masses
$>\!10^{11.3}M_\odot$, that undergo wet compactions, become sufficiently
compact for significant heating. Constituting a major fraction of the accretion
onto haloes $\geq\!10^{12}M_\odot$, these satellites heat-up the cusps in half
a virial time at $z\!\sim\! 2$. Using a model for outflow-driven core formation
(CuspCore), we demonstrate that the heated dark-matter cusps develop extended
cores in response to removal of half the gas mass, while the more compact
stellar systems remain intact. The mergers keep the dark matter hot, while the
gas supply, fresh and recycled, is sufficient for the AGN outflows. AGN indeed
become effective in haloes $\geq\!10^{12}M_\odot$, where the black-hole growth
is no longer suppressed by supernovae and its compaction-driven rapid growth is
maintained by a hot CGM. For simulations to reproduce the dynamical-friction
effects, they should resolve the compaction of the massive satellites and avoid
artificial tidal disruption. AGN feedback could be boosted by clumpy black-hole
accretion and clumpy response to AGN.
