An unfortunate thing about headings is that they are spoilers. I like the idea of a writing style where headings come at the end of sections rather than at the start. Or even a "starting heading" which is a motivating question and an "ending heading" which is the key insight discovered ...
Analogous to a "reverse mathematics" style of writing where motivation precedes proofs/theory precede theorems.
edited to clarify: I'm talking about technical writing; I don't care about fiction.
By the way, there was a time where spoilers were considered normal and maybe even desirable. I remember reading an old book, I think it was by Jules Verne, where chapters started like this: "Chapter 5, in which the protagonist succeeds to overcome the obstacles, collect enough resources, and launch a rocket to the Moon".
I have no idea whether all fiction books used to be like this, or only some of them, and whether it was universal, or only a specific time and place.
1Abhimanyu Pallavi Sudhir
matter of taste for fiction; but objectively bad for technical writing