The whole business of typesetting is finding the right compromises
for a given job. For example, in paperback novels, the convention
is that you have fixed linespacing, no interparagraph distance,
and flush bottom margins. Since there is no stretchable space
on the page, it will not be possible to always avoid stranded
lines while adhering to those constraints. (And, from looking
at published work, it seems that for this type of job orphans
and widows are entirely acceptable.)
> if one's typesetter employs the Knuth-Plass algorithm for
> breaking lines within paragraphs, one need never worry about
> managing widows and orphans...
TeX's formatting model is based on optimization, finding the
"least bad" instance of a line-broken paragraph. How "bad"
orphans ("clubs" in TeX) and widows are considered to be
is user-specifiable. If you don't set a sufficiently high
penalty for these, then other criteria will dominate, and
TeX will in fact produce output with stranded lines.
> 2. You can employ what I call "poor man's keeps".
This can also be automated, for example by counting lines.
See here:
https://lists.gnu.org/r/groff/2003-01/msg00024.html
(But remember, avoiding orphans and widows might not be
compatible with other job constraints. Something always
has to give.)