Yes, the save template can do that. And combined with custom metadata that is automatically computed and based on other metadata (custom columns) it can do much, much more.
Whatever folder structure
you set up. The limitation is most likely
you, or the length of the path your OS allows, not what is possible to do in calibre.
If you can formulate an unambiguous set of rules for how to build the path and the filename, based only on the metadata, then it is most likely possible to fully automate that in calibre. Also you can use plugboards to automatically generate custom metadata to store inside the books. For instance add published date to the title of periodicals, or series information to books. And so on.
The effect is that you can automatically, consistently and efficiently store books in a very detailed and complex folder tree, completely different for different types of works if needed. Different tree structures for periodicals, fiction, nonfiction, short stories, comics, fanfiction and biographies. Or whatever you need. It can be almost as efficient as using the calibre GUI to locate the books directly in the calibre library. But only almost...