You're in luck.
Quick Cookie Manager does exactly what you want.
The trick is to export cookies from a container, and then ensure the same container exists before performing the import operation.
BecauseA successful technique is to create a permanent container with the same name in both the source and target Firefox profiles. Use that permanent container to store your desired cookies. You will then be able to easily transfer the cookies in that container between profiles.
You can also implement the above technique with multiple permanent containers that are duplicated across multiple Firefox profiles. This allows for isolation between several sets of cookies.
Furthermore, because the exported cookies are stored in a human-readable format, you can even edit the export file by hand to adjust to which container the cookies will be imported.
This extension is fully compatible with the Multi Account Containers and Temporary Containers extensions.
This Firefox extension is a rare Mozilla Recommended extension, which means Mozilla ensures it meets "the highest standards in security, functionality, and overall user experience".
It is available from AMO here:
https://addons.mozilla.org/firefox/addon/cookie-quick-manager/
And on GitHub here:
https://github.com/ysard/cookie-quick-manager