Convince the web standards bodies and browser implementers and transform the world into one where HDR on the web is perfect and never causes issues.
But until that's done, there's a simple solution: Just don't support HDR. Until your hypothetical perfect solution is universally implemented, it does more harm than good on the web and should not be supported.
I don't see why anyone would want HDR on the web in its current form.