The 5000 threshold should not apply when saving a list as a template without content!
We are unable to save a document library as a template without content and are getting the 5000 threshold error message. Although the library has 37 000 items this should be absolutely irrelevant when saving a list/library as a template! Surely the list definition (including columns, views, etc.) have nothing to do with how many items are in the list! There are similar occasions when we run into the 5000 list error when it should be irrelevant - as the 5000 limit is a hard wall your customers run into I suggest Microsoft develop a way to log errors to do with the 5000 limit and ensure that these strictly apply to when users attempt to display more than 5000 items, not administrative tasks!
I was able to save a list as template using PNPProvisionTemplate in Powershell