I was looking for this exact setup a couple months back. I found a system that works for me, though not exactly perfect.
You can use the extension "Simple Tab Groups"[1] to automatically open some domains in specific Firefox containers like you described, by assigning a container to a group, and then configuring a domain to always open in that group.
The downside is that not all groups will be visible at a time, and you'll need to first select your previous group before finding the tab you came from. For me, that's an acceptable downside given the advantages it brings.
You can use the extension "Simple Tab Groups"[1] to automatically open some domains in specific Firefox containers like you described, by assigning a container to a group, and then configuring a domain to always open in that group.
The downside is that not all groups will be visible at a time, and you'll need to first select your previous group before finding the tab you came from. For me, that's an acceptable downside given the advantages it brings.
[1] - https://addons.mozilla.org/en-US/firefox/addon/simple-tab-gr...