in theory i can follow you but have you experienced any issues regarding this?
i mean - i‘ve never had such issues before.
on the other hand you can also sort plugins. just an idea but you could „just“ order the plugins and try if this would work. otherwise i would recommend to build a scenario and open a bug report on github.
You need to make a decision: either you do this server-side or client-side.
Should you choose to write the plugin, it is very easy, write a Content plugin which ...