Another approach is as follows (this was my solution when faced with the same problem):
Turn the DEM into contours (polygons) at 1m intervals
Make these polygons 'single-part' - i.e....
Update: I managed to do it with the v.segment tools from GRASS. I had issues creating the .txt needed but in the end it did exactly what I needed.
So the txt file needs to be ordered that way with Tab ...