Hi Russell, This is not exactly what you asked for, but here's some code that ensures blank lines exist between headings and entry content. You could modify it to remove excess lines without too much trouble.
https://github.com/alphapapa/unpackaged.el#ensure-blank-lines-between-headings-and-before-contents