This isn't really a task that can be accomplished with CSS. CSS is used to change how content looks, i.e. colors, spacing, and so forth. CSS isn't meant to directly change the text or HTML content of a webpage.
In theory, per PedroM's note, there would be MediaWiki: system messages for changing it across an entire wiki. However, this edit suggests to me that they don't work. (Maybe you should try it and see if they do. If they don't, maybe file a bug report at Special:Contact to see if those system messages can be reinstated.)
Is there a particular reason you can't use the "data-expandtext" and "data-collapsetext" attributes? To my knowledge, many wikis use collapsible elements in templates, rather than directly on pages, so there would only be a small number of templates where that code would appear. If at all possible in your case, that would be my first suggestion to try.