Your comment just made me realize how easy it would actually be for a court to implement such a ban these days: They could simply require Apple to not ship a content blocking API anymore in their jurisdiction. Thanks to Apple's ban of third-party browsers, that would be enough.
On Android, the situation is slightly better, since browsers can be sideloaded, but ad blockers would quickly become a niche phenomenon.