@petros I know how to do this from the CLI or in vim, or even in gedit, but without restricting to selected text. I'm not sure whether any of these would be helpful for you.
In particular I could write a script for you that does this for the whole file, and then you could only manually add hyphens before line breaks you want to keep before running the script? An annoying workaround, but I'm not sure what would be helpful so I'm mentioning it.
@petros Oh, and I could also help with something like "Select text→Ctrl+C→switch to terminal→run script→switch to gedit→Crtl+V", but that might also not be helpful.