In order to be able to stop shipping the older styles in content.thumbnails-*.less, content that's mimicking the parser media output needs to be migrated to the new structure.
However, the styles in content.media-*.less are targeted towards typeof="mw:File" annotations, which might not make sense semantically for that content (and would likely be sanitized away). Perhaps we need to add a class in the stylesheet for this content to target instead? But note that, in T314097, it was discouraged to add a classes that MediaWiki core isn't generating:
I don't think it makes sense to put a class here that's not generated by MediaWiki core however. At the very least not without a huge inline comment explaining why.