  Efficient control of turbulent heat transport is crucial for magnetic
confinement fusion reactors. This work discusses the complex interplay between
density gradients and micro-instabilities, shedding light on their impact on
turbulent heat transport in different fusion devices. In particular, the
influence of density gradients on turbulent heat transport is investigated
through an extensive inter-machine study, including various stellarators such
as W7-X, LHD, TJ-II and NCSX, along with the Asdex-Upgrade tokamak and the
tokamak geometry of the Cyclone Base Case (CBC). Linear and nonlinear
simulations are performed employing the $\delta$f-gyrokinetic code stella
across a wide range of parameters to explore the effects of density gradients,
temperature gradients, and kinetic electrons. A strong reduction in ion heat
flux with increasing density gradients is found in NCSX and W7-X due to the
stabilization of temperature-gradient-driven modes without significantly
destabilizing density-gradient-driven modes. In contrast, the tokamaks exhibit
an increase in ion heat flux with density gradients. Notably, the behavior of
ion heat fluxes in stellarators does not align with that of linear growth
rates. Additionally, this study provides physical insights into the
micro-instabilities, emphasizing the dominance of trapped-electron-modes in
CBC, AUG, TJ-II, LHD and NCSX, while both the trapped-electron-mode and the
passing-particle-driven universal instability contribute significantly in W7-X.
