Seems odd though that other cities can largely figure this out. Seems like a zoning failure, but nobody is talking about that. Maybe there is bias here since the zoning threads are always about increasing density, which this problem seems to largely be based (and coupled with old infrastructure and politics/cost/union).
I mean sure, but you're not going to be able to undo the past 100 years of development in NYC that caused it... so what's there to talk about? if they rezone NYC to require space for trash barrels and dumpsters it could be 200 years before half of the city redevelops to incorporate it.
NYC is one of the few places that has density in the US, and largely because it's old density. I feel like you're trying to paint this with a "see density bad" argument that is a lot more nuanced than you're making it.
Density without modern updates or planning for the future is basically the root cause of this and other issues there. This is important to note even for proponents of increasing density. Even if it's old density, updates for things like rentals can be enforced. Modern approaches are how international cities deal with their trash at similar densities (compactor, below grade, tubes, etc). Politics are a major hinderrance. Is it really a surprise that NYC has a waste problem when the waste management budget has been repeated cut in the past few decades? Now they want to take the cheap and non-scalable bandaid option of dumpsters on streets, instead of a modern and forward looking approach, while blaming people with vehicles (for which the city has failed them in modern approaches or quality alternatives). Classic blame the other subgroup instead of the leadership. But yes, there is a lot of details, subtleties, and caveats involved in all of these.