The system I'm most familiar with is Gentoo's Portage; that implements file collision checks so packages can't straight-up modify existing bits of the system, but often plugins are separate packages which executables enumerate somehow so this kind of thing certainly could be done. I assume apt and other things would be fairly similar.
I suspect the biggest advantage there (which isn't fundamentally to do with the repo system) is that you can complain to Ubuntu or whoever and they're rather more likely to put a stop to something like this than Microsoft or Apple are.
I suspect the biggest advantage there (which isn't fundamentally to do with the repo system) is that you can complain to Ubuntu or whoever and they're rather more likely to put a stop to something like this than Microsoft or Apple are.