I've been playing around with HDR images on the web. It seems that, for AVIF (the only web format that supports high bit depth and gain maps), gain maps add a lot of overhead. On the web it'd be much better to use <picture> to serve the right image for the screen.
cjxl doesn't support gain maps yet, and neither does jxl-rs, but it'll be interesting to see if it has this same overhead problem. I suspect it will.