Conditional page breaks?

Is it possible already? Can it be added?

In a text with headers and text body, I don’t want a Header to be toward the end of a page with less than three lines of text body. So I insert manually a page break to move the header to a next page. But while I am editing, this might cause previous paragraphs to end up on an almost empty page. I want a more intelligent page break that conditionally works depending on available space. Ideally this would be an automatic behaviour that can be set for the headers (or a paragraph style).

Can’t you use Orphan/Widow control for this purpose? See Format → Paragraph → Text Flow and Text Flow - LibreOffice Help