Pretreatment of the solids prior to electrostatic separation