Would it be possible to add an intermediate setting option between 8-bits/component and 16-bits/componente in JXL export options? Something like 12-bits/component (and/or 14-bits/component)?
Because 16-bits/component is overkill (with RAW files initially in 12 or 14-bits/component) and generate much bigger files in lossless option (and even in lossy 100% quality setting) and 8-bits/component loses a part of the color spectrum. These options could lead to a better compromise between quality, absence of data loss and the final size of the exported files.
I think 16-bit JXLs, when correctly implemented, provide the "better compromise between quality, absence of data loss and the final size of the exported files" you're looking for.
Imagemagick's "magick" utility, which uses the "libjxl" reference library, produces reasonably sized 16-bit JXLs. For example, it converts a Canon EOS 5DS R 50 megapixel / 53 MB raw to a 16-bit, quality 90 JXL that's 8 MB. It converts a Nikon Z 9 45 megapixel / 52 MB raw to a 16-bit, quality 90 JXL that's 4.5 MB.
I can't figure out how to reduce the bit depth of the JXLs to 14 or 12 using "magic" (it may not be implemented), so I can't compare the file sizes with 16-bit. But it may significantly less than 25% (= 100% - 12/16), since the compression algorithms might do a good job of compressing the unused extra zero bits.