You mean that there is a tone curve applied? That may be, but it is pretty much irrelevant: I care about clipping, not the exact distribution.
The histogram is tool for quick assessment of the light distribution, not something you calibrate precisely.
But I don’t. I also use zebra patterns, and most importantly, judgement based on experience.
I know my camera, and know the performance of post-processing algorithms (in Darktable), so I know how much I can overexpose on various surfaces and still reconstruct highlights. I know how much I can pull from the shadows, so I know when I should consider to bracketing if I want a lot of dynamic range.
You are trying to reduce these things to a single number you can just measure with a device… but it does not work that way.
Also, you misunderstand ETTR: it still not an automatic process you apply blindly, as it still involves judgement. In practice, for outdoor photos on a sunny day, you don’t want to capture specular highlights and similar, as even the very best sensors will lose a lot of information in the shadows, in exchange for capturing an extra 3–5 EV range that will mostly render as white after processing.
It looks like you are learning digital photography. Instead of trying to come up with an algorithm for exposure, I would recommend that you just keep shooting, reviewing, processing, and you will learn what works best for you given your equipment, shooting style, and artistic intent.
You may find that you are OK with blowing highlights (Darktable’s inpainting algorithms are great, BTW), develop a taste for silhouettes, or reach for your tripod and bracket each shot because you want to capture everything. Each is a legitimate choice and can lead to great images.
(Personally, I remember fretting about exposure calculations a lot when I started using Darktable. It took me about a year and \approx 2000 images to get to a stage I find satisfactory. I still experiment with a range of exposure settings occasionally whenever I see an example of something I like).