  Future gravitational wave observatories can probe dark matter by detecting
the dephasing in the waveform of binary black hole mergers induced by dark
matter overdensities. Such a detection hinges on the accurate modelling of the
dynamical friction, induced by dark matter on the secondary compact object in
intermediate and extreme mass ratio inspirals. In this paper, we introduce
NbodyIMRI, a new publicly available code designed for simulating binary systems
within cold dark matter `spikes'. Leveraging higher particle counts and finer
timesteps, we validate the applicability of the standard dynamical friction
formalism and provide an accurate determination of the maximum impact parameter
of particles which can effectively scatter with a compact object, across
various mass ratios. We also show that in addition to feedback due to dynamical
friction, the dark matter also evolves through a `stirring' effect driven by
the time-dependent potential of the binary. We introduce a simple
semi-analytical scheme to account for this effect and demonstrate that
including stirring tends to slow the rate of dark matter depletion and
therefore enhances the impact of dark matter on the dynamics of the binary.
