That is sort of what sponsored segments are, and what sponsorblock is quite effective at dealing with. If they're injected on the fly at variable time points, it gets harder, but I suspect fingerprinting could work well enough.