That in particular is an example of an ODT template, being called upon by Pandoc’s command line arguments to inject the text into the styling. But yes, I use CSS for HTML (it has counters), too.
I haven’t looked into it, but I think Pandoc has numbering arguments too, which might be better for ebooks, if that’s what you’re looking at (CSS counters are scoped to .html files, and ebooks tend to have one file per major section; twenty Chapter One’s in other words). But Scrivener’s numbering isn’t a bad choice either, it is dynamic after all, just not after the fact. You do have to compile again if the content shifts.