Hydrodynamic clogging in planar channels is studied via direct numerical simulation for the first time, utilising a novel numerical test cell and stochastic methodology with special focus on the influence of electrostatic forces. Electrostatic physics is incorporated into an existing coupled lattice Boltzmann-discrete element method framework, which is verified rigorously. First, the dynamics of the problem is governed by the Stokes number, $St$. At low $St$, the clogging probability, $P$, increases with $St$ due to increasing collision frequency. At high $St$, however, $P$ decreases with $St$ due to quadratic scaling of hydrodynamic force acting on arches. Under electrostatic forces, clogging is well represented by the wall adhesion number, $Ad_w$. For $Ad_w \lesssim 4$, the mechanical dependence on $St$ is exhibited, while for $4 < Ad_w < 20$, there is a transition to high $P$ as sliding along, and attachment to, the channel surface occurs increasingly. For $Ad_w \gtrsim 20$, clogging occurs with $P > 0.95$. Particle agglomeration, however, can also decrease $P$ due to diminished interaction with channel walls. Distinct parametric regions of clogging are also observed in relation to the channel width, while a critical width $w/d^*=2.6$ is reported, which increases to $w/d^*=4$ with strong electrostatic surface attachment. The number of particles that form stable arches across a planar channel is determined to be $n=\left \lceil {w/d}\right \rceil + 1$. Finally, sensitivity to the Coulomb friction coefficient is determined in favour of calibrating numerical parameters to bulk system behaviour. The greatest sensitivities occur in situations where the arch stability is lowest, while clogging becomes independent of friction for strong wall adhesion.