OK, I humbly admit it - I cheated.
The given Plane’s Up-axis must define what is up.
Regarding manual mode: No manual intervention allowed. Otherwise this would have been a walk in
the a dark park.
Me too. I can probably find 777 cases, with no or little effort. This was to my surprise when I started to dig into it.
Regarding connectivity for a drainage strategy: The meshes won’t get better than this. More likely worse. We live in a fallen world. Therefore, be of good courage, it will be easier to stop the recursion than the curse.
However, do not count on interconnected upper faces. You will encounter gaps (perhaps not in this mesh but…). I tried earlier with a Contours strategy, but that failed because the surface wouldn’t always be intact (holes in the surface meant gaps in the contour = more lost than a lost soul).
If you mean work on groups of faces, then that would perhaps make an algoritm more resilient to gaps.
For very “peaky” meshes I sometimes use a star MeshFace (vertice + connected vertices) to calculate an “average normal” for face groups in order to “guard” individual faces which in fact are among the “top-most” faces but have a tilt to them. Such an “average normal” can then be used in filters comparing vector angles. This is even more important when building temporary surfaces from filters, temp surfaces to be used for further analysis, since tilted faces may cause holes in the temp mesh if omitted, and so causing problems for the next algoritm. Aso.
I expect to be working only with good meshes in the hereafter.