Electrophoretic deposition of insulating material