JPEG XL is the standard to beat them all. Like how Opus became the definitive codec for lossy compression for the web. JPEG XL covers nearly every use case for images, even replacing GIFs with it's animation support. Existing JPEGs can also be re-encoded losslessly into JPEG XL format/data structure and get significant file size savings. This backwards compatiability is very important in transitioning to web to JPEG…
How well does JPEG XL deal with color spaces? I don't know much about them, but understand that not all color spaces are create equal, and data gets lost in conversions.
[1] A JPEG XL file can be a minimal bitstream or an ISOBMFF container, where the latter can contain the actual bitstream and additional metadata like Exif. The bitstream itself should be enough for decoding.