  We carry out a detailed study of the confinement phase transition in a dark
sector with a $SU(N)$ gauge group and a single generation of dark heavy quark.
We focus on heavy enough quarks such that their abundance freezes out before
the phase transition and the phase transition is of first-order. We find that
during this phase transition the quarks are trapped inside contracting pockets
of the deconfined phase and are compressed enough to interact at a significant
rate, giving rise to a second stage of annihilation that can dramatically
change the resulting dark matter abundance. As a result, the dark matter can be
heavier than the often-quoted unitarity bound of $\sim100~$TeV. Our findings
are almost completely independent of the details of the portal between the dark
sector and the Standard Model. We comment briefly on possible signals of such a
sector. Our main findings are summarized in a companion letter, while here we
provide further details on different parts of the calculation.
