Hi Stefano,
I face this sort of thing all the time in the new complexity scores that I set. Despite the elegance you seek - and I fully understand the vertical end point alignment you are wanting - sometimes it is easiest just to roll over and draw the lines as a path, perhaps using Postscript, or path markup commands. This may make more sense when you encounter things that are like hairpins but not quite - the sort of graphics composers armed with pencils like to draw, unwitting of the agonies it causes we engravers.