Hi Harm,
Thanks for this. Brilliant as always. This works fine in the context of my complicated string quartet score, where almost anything breaks it! So that's a good sign, I'd say this is ready to replace LSR 233. Your code is clearer and more compact, and as you say, does not struggle against the defaults.
As for having the text inside the hairpin, this only occurs in the handwritten MS I an engraving from, and it's not at all necessary. It creates far too many problems, I know, and does not add any semantic extras.
Andrew