Although it may not fit in your ecosystem, Dolphin from KDE already does this - at least when running under KDE.
Another approach could be to restore a preset session.
This can be achieved using one or more autostart scripts to start particular applications with your preferred options and then using programs like
xdotool to interact with their GUIs as if you were using your keyboard and mouse to imitate what you would do to set them up manually. Usually, the applications can't tell it's not you typing, so you can get them to do almost anything they're capable of.
All of this works for applications without any special APIs, etc.
Once the session is restored, further automation/configuration can be achieved using tools such as
AutoKey which make such tasks much easier.
The part of your question that this doesn't address is restoring whatever arbitrary session characteristics may have been in place when you closed your last session.
While some scripts could probably be written to discover and save the final state of a session before closing it (so subsequent startup scripts would know what to do), that would be quite difficult to implement and probably not worth the effort.