Containers don’t offer a benefit over normal browsing for this, Firefox already blocks and isolates third party cookies.
Caching is also a tracking signal.
Caches are also isolated. One of the reasons you shouldn't use a JavaScript CDN any more.
I assume you mean a public CDN, like code.jquery.com. There’s still reasons to serve JavaScript from your own CDN, like code splitting and serving the bundles closer to the user.