Meshpatch uses some sort of Delaunay algorithm to connect the points as far as I know. In my understanding it projects the points to a plane, connects them, and then re-projects the points to their original height.
The problem happens if you have vertically stacked points - i.e. same XY coordinates but different Z - such as might occur if you are using contour lines that include vertical walls. In those areas, the algorithm Rhino uses no longer knows which point goes back to which height when re-projecting the vertices, so it can get confused and the wrong points get connected in 3D.
One thing you can do - if you don’t have too many vertical wall areas - is edit the contour lines by moving the stacked line areas “outwards” by just a tiny bit - anything above the file tolerance will probably work. It’s like adding a tiny bit of “draft angle” to the walls, but mostly it will not be noticeable. The idea is to separate the vertically stacked points so Rhino knows how to connect them in 3D. There is certainly a bit of manual work involved, but it will give you a better mesh in those areas.
Some tools that can help -
Ctrl+Shift to sub-select line segments, then use Gumball with the “Object” setting to move them a fixed tiny amount in their perpendicular direction.
If you have a long string of connected segments, use ExtractSubCrv, Copy=No, select the segments and Enter. Then use Offset by a small amount, delete the original subcurve and re-connect the offset part to the original.
When you’re done editing your contour lines, then use ExtractPt and run your MeshPatch.
Yes, this can work, with a small “but”… Terrain models that have vertical walls can have them running in any direction. So tilting 1 degree or so in one direction might work to make a “positive draft” for some of the walls, but it might also cause actual undercuts for others…