Ideal world - You declare your stack, from OS, distributor up to all dependencies used.
Non-profit/individuals non-profit don't pay anything.
Everyone else/companies pay $0.01 per dependency, per month. Each package (at each layer) describes its own dependencies. So a docker image, installing ubuntu (ubuntu declares its own dependencies - libc, curl, git, whatever), running npm, and all node packages, and you take a bill of cost from this "bundle". If dependencies share dependencies it only counts as 1 no matter how many times it's repeated in a single setup.
If there's 1million servers running linux, that's 10k for the linux foundation per month. Probably there would need to be a tiering of cost/distribution, as a left-pad node package isn't worth the same as a linux distribution, and companies with + a certain threshold should perhaps pay more.
The benefits would be that people would stop installing 10.000 npm libs as they gets expensive fast, so people would try to write more comprehensive libs and the quality would go up.
You don't need to poke holes in the idea, it's basically an open ocean, but it would be nice to see something totally automated like this.