Why can words with hyphen char not be hyphenated?

The TeXbook, page 454, last but one double dangerous bend paragraph

If a trial word l1 … ln has been found by this process, hyphenation will still be abandoned unless n ≥ λ + ρ, where λ = max(1,|\lefthyphenmin|) and ρ = max(1,|\righthyphenmin|). (Plain TeX takes λ = 2 and ρ = 3.) Furthermore, the items immediately following the trial word must consist of zero or more characters, ligatures, and implicit kerns, followed immediately by either glue or an explicit kern or a penalty item or a whatsit or an item of vertical mode material from \mark, \insert, or \vadjust. Thus, a box or rule or math formula or discretionary following too closely upon the trial word will inhibit hyphenation. (Since TeX inserts empty discretionaries after explicit hyphens, these rules imply that already-hyphenated compound words will not be further hyphenated by the algorithm.)

An explicit hyphen is a character whose character code matches the font's \hyphenchar value or a ligature that ends with such a character (that's why also -- or --- inhibit hyphenation).

Indeed, if you try the following example, you'll see that TeX hyphenates the compound word:

\documentclass{article}
\usepackage[T1]{fontenc}
\usepackage[ngerman]{babel}
\begin{document}
\hyphenchar\font=\string"7F

\parbox{1pt}{In Baden-W\"urttemberg}

\end{document}

The result is

In
Ba-
den-Würt-
tem-
berg

The T1 encoded fonts have in position 0x7F a character which is identical to the normal hyphen. Changing the \hyphenchar to denote this slot, the normal hyphen does not inhibit hyphenation any more.


The \hyphenchar\font=\string"7F seems not the correct work around for this problem, since it is not font independent.

A better way would be to set the \defaulthyphenchar=127 which seems font independent. Also hyphenation which are defined in acronyms will be correct too. BUT there are still issues when having hyphens in the text like:

Baden-W\"urttemberg
\gls{BP}-Test

enter image description here

If you look at "den-Würt-", it is still not split correctly into two lines. Also the last example "BP-Test" isn't split. The only work around I have found is to use "= instead of - in the text which works for now. But I would appreciate a better solution...

Here is the MWE:

\documentclass{article}
\usepackage[T1]{fontenc}
\usepackage[ngerman]{babel}

%\usepackage{lmodern}
\usepackage{mathptmx}

\usepackage[
nonumberlist,
acronym,
nopostdot,
section]
{glossaries} 

\newacronym{BP}{BP}{Borderline-Pers\"onlichkeitsst\"orung}

\defaulthyphenchar=127

\begin{document}
\parbox{1pt}{In Baden"=W\"urttemberg}

\parbox{1pt}{In \gls{BP}}

\parbox{1pt}{\gls{BP}"=Test}

\end{document}

enter image description here