For one, because Docker is not a sandbox, and containers are not a strong security boundary[1]. What you really need here is a strongly isolated VM, at which point you're playing cat-and-mouse games with your target: their new incentive is to detect your (extremely detectable) VM, and your job is to make the VM look as "normal" as possible without
actually making it behave normally (because this would mean getting exploited). That kind of work has a long and frustrating tail, and it's not particularly fruitful (relative to the other things packaging ecosystems can do to improve package security).
> I know there is a researcher out there who has retrieved and installed every single pip package to do an analysis, which is a good start.
You're probably talking about Moyix, who did indeed downloaded every package on PyPI[2], and unintentionally executed a bunch of arbitrary code on his local machine in the process.
[1]: https://cloud.google.com/blog/products/gcp/exploring-contain...
[2]: https://moyix.blogspot.com/2022/09/someones-been-messing-wit...