Widow/orphan definitions encompass only the case of a page break occurring inside a paragraph, leaving lines in small number either at the bottom or the top of a page.
You can control the threshold of this “small” number of lines under which the group of orphan/widow lines are flushed to next page.
Your requirement above does not fit in this definition as you request special processing for all paragraphs. I ma not aware of any application handling this case (from memory, Quark XPress doesn’t do it).
Without fixing it, the ragged appearance may be mitigated by justifying the text from margin to margin. Activate the attribute in the paragraph style. It is then usually acceptable to end up with an incomplete last line, even if it contains a rather short word. Justification plays with ordinary U+0020 SPACE width. It does not change the number of words on a line (at least as far as I know, spaces are expanded, not shrinked to make room for more words).
As I mention in a comment to 258383/style-applies-only-to-alternating-paragraphs-whats-going-on, a workaround can be designed based on the statistics of your paragraphs. If you stumble rather frequently on the case of a “widow word”, you may try to play with tracking (= letter-spacing).
This will apply a uniform extra spacing between letters. However, be aware that this may be detrimental to readability if you compress too much or expand too much. Both “directions” may be tried to find the best compromise over all the document.
From experiment, a Character spacing of 0.1pt or -0.1pt (in the
Position tab of paragraph styles) is perceptually nearly unnoticeable and can give you what you’re looking for. Higher values degrade font aesthetics. Don’t forget to uncheck the Pair kerning box.
Note that the results is highly dependent on document contents and the setting may need further adjustments when you add or remove material to preserve the overall compromise.
Also, the use of double-space after a punctuation may adversely affect the result.
To show the community your question has been answered, click the ✓ next to the correct answer, and “upvote” by clicking on the ^ arrow of any helpful answers. These are the mechanisms for communicating the quality of the Q&A on this site. Thanks!
In case you need clarification, edit your question (not an answer which is reserved for solutions) or comment the relevant answer.
(edited the answer to add a warning about the Pair kerning checkbox)