Planarizing this works fairly simply-
planarize_AL.gh (18.5 KB)
Start with the anchor goal strength at 1 to keep the result close to the input mesh, then gradually slide it down to zero to allow the planarity constraint to be enforced strictly.
I think those threads you link to get a bit off track - Torsion free nodes can be fairly simple too, but because this starting mesh is a bit kinked it looks like it will need something to smooth the grid.