Measurements from the Magnetospheric Multiscale (MMS) mission indicate that the density gradients associated with nonlinear compressional structures (shocklets) in a quasi-parallel bow shock trigger sequentially two instabilities that heat ions and electrons. The Lower-Hybrid-Drift (LHD) instability, triggered by the diamagnetic drift of ions, produces electric fields and ExB drift of electrons that triggers the Electron-Cyclotron-Drift (ECD) instability. Both instabilities create large amplitude electric fields $\sim$20–200 mV/m at wavelengths comparable to the electron gyroradius. Strong gradients of the electric field lead to stochastic heating of both ions and electrons, controlled by a dimensionless function $\chi = m_iq_i^{-1} B^{-2}\mathrm{div}(\mathbf{E}_\perp)$, which represents a universal, non-resonant heating mechanism for particles species with mass $m_i$ and charge $ q_i$, independent of the type of waves and instabilities.