I think a good approach would be to have web browsers limit the amount of memory ads can use on a given page.
This would hopefully align incentives: we understand that ads are necessary for the web, but ad makers have to work on efficiency to increase revenue. This would theoretically be like "AMP for ads". If you use too much memory, your ads drop because you keep crashing on the page (just the ad of course).
If you wanted to be perverse, you could have a limit on TOTAL memory all ads could use on a page, so you end up creating group pressure on any individual that's not playing nice (they might start demanding not to be served on the same page as those ads etc). But maybe this is too much. Just limiting the total amount of "memory usage" is a good start.
The important thing here is that it hopefully leads to the world we actually want: REASONABLE ads that don't require crazy measures that end up hurting the sites we love. Browsers COULD ship this by default without hurting the ecosystem.
Mozilla is looking to use Firefox's Tracking Protection list to lower the priority of ads' HTTP requests and more aggressively throttle them when they are not visible. But setting a fixed ad budget per page, as you suggest, or maybe forcing all ads from all tabs to share one process could be interesting.
have web browsers limit the amount of memory ads can use on a given page
That's easily done by installing an adblocker! Can't beat memory limit = 0.
we understand that ads are necessary for the web
Well, hold on now. The web existed before ads did, and it was pretty cool. If ads disappeared, we'd still have a web - lots of its most annoying parts would disappear, and we'd have a lot of readjusting to do, but what we'd end up with would keep all the best parts of what we have now, because the best parts of the web aren't based on ads.
This would hopefully align incentives: we understand that ads are necessary for the web, but ad makers have to work on efficiency to increase revenue. This would theoretically be like "AMP for ads". If you use too much memory, your ads drop because you keep crashing on the page (just the ad of course).
If you wanted to be perverse, you could have a limit on TOTAL memory all ads could use on a page, so you end up creating group pressure on any individual that's not playing nice (they might start demanding not to be served on the same page as those ads etc). But maybe this is too much. Just limiting the total amount of "memory usage" is a good start.
The important thing here is that it hopefully leads to the world we actually want: REASONABLE ads that don't require crazy measures that end up hurting the sites we love. Browsers COULD ship this by default without hurting the ecosystem.