Deleting Redundant Edges from a Solid

Iterate over your edges and for any edge connected to two faces, check if they are co-planar: