I needed a similar functionality and I wrote a plugin: https://github.com/madeingnecca/sublime-layout-zoom
The only difference is that I only needed to "zoom" on a single layout, and then to restore the previous layout.
However you can browse the source code and modify it according to your needs; for example you can write a "save layout" command, switch layout and then run a "restore layout" command. Just to let you know this is possible via st2 api.
Before writing this plugin I read your answer and it has been inspiring. Thanks.