If you look closely at your desired output, you'll notice something: The hyphen on the second line sticks out a little more than the hyphen on the first line (1.88937pt to be precise). So i'm not going to attempt to re-create that.
Instead it's worth knowing about a few parameters in the TeX engine surrounding line breaking that are relevant to your concerns:
\pretolerance is the level at which TeX is willing to say a paragraph is good enough without even trying to hyphenate. It's set at 100 by default which says that it can stretch spaces a bit but not a whole lot. There's also \tolerance which is the setting for how much badness to allow even after hyphenation, which by default is 200.¹
\hyphenpenalty is the penalty for having hyphens appear in a line. This is set to 50 by default. As a consequence, TeX is going to try really hard to keep you down to no more than 4 hyphens per paragraph.
These two parameters are enough to get you close to your desired output. We can put
\pretolerance=0
\hyphenpenalty=0
in the preamble and we'll get almost the specified output. The second line will be a little different because, as noted above, there's no way to make the line fit even with a hyphen although the spacing is not too bad.
Ulrike raised another possibility in her answer by meddling with the font dimens for the current font and removing all stretchability. This results in the same issue as your original output though, putting the output on the second line of the paragraph a bit into the margin again. For the sake of completeness, the font dimens that are relevant to spacing are:
\fontdimen2 interword space (⅓ em)
\fontdimen3 interword stretch (⅙ em)
\fontdimen4 interword shrink (⅟₉ em)
\fontdimen7 extra space at sentence end (⅟₉ em)
I'd argue that these values are not that great. In my typography classes, the default inter-word space was a ¼ em, shrinking to ⅕ em or expanding to ⅓ em which would give values of
\fontdimen2\font = 0.25em % ¼
\fontdimen3\font = 0.0833em % ⅓ - ¼
\fontdimen4\font = 0.05em % ¼ - ⅕
and I would edit the VF files for the fonts I used in typesetting Serif Magazine to reflect those numbers since the old afm2tfm tools would use the wider TeX defaults by default.
It's worth noting that adding those settings to your original document gives the line breaks you get with my \pretolerance and \hyphenpenalty settings without having to set them and fixes the line break issue in your setting with the ~s. Adding \frenchspacing (to get rid of yet another aspect of TeX's typesetting which puts way too much white space in the paragraph) and everything sets the same all the way through.
- If you do
\sloppy in LaTeX \tolerance gets set to 10,000 which, as far as TeX is concerned, is infinity. This is why you'll often see, especially in narrow columns set with \sloppy a paragraph in which just one line has a huge space separating two words while the rest of the paragraph is normal. Arguably, TeX has set infinity a bit too low (a consequence of using 16-bit values for holding integer values, a choice which made more sense in 1982 than 2021) and it doesn't take too much stretching to hit infinity and its better to have one really bad line than multiple kind of bad but also infinitely bad lines.
\frenchspacingin the document preamble and you'll see. – egreg Jul 04 '21 at 08:29