text-wrap: balance and pretty
One is for headings, one is for paragraphs, and using the wrong one costs you performance for nothing.
A heading that wraps to two lines with one word on the second is the single most common piece of ugliness on a website, and for years the fix was a non-breaking space typed in by hand, which then survived a copy edit by nobody.
h1, h2, h3 {
text-wrap: balance;
}
balance evens the lines out so a heading breaks somewhere sensible. It is capped (browsers stop at a handful of lines, around four in practice) because balancing is expensive and the layout cost on a long paragraph would be real.
p {
text-wrap: pretty;
}
pretty is the one for body text. It does not even the lines; it looks ahead far enough to avoid a single-word last line and some of the worse breaks. It is cheap enough to put on every paragraph.
So the rule is just: balance for things with two or three lines, pretty for things with ten. Putting balance on body copy is the mistake to avoid. It fails quietly by doing nothing on anything past the line cap.
Both degrade to normal wrapping in a browser that does not know them, which makes this about the lowest-risk thing you can add to a stylesheet. I put the two rules in the base layer of a project now and never think about them again.