ETTR is of no value when shooting JPEG only, and the histogram is exactly what it should be. It always very accurately shows data for the JPEG.
Orly?
I suppose these two images look about equally high quality to you?


Left: Image ETTR in jpeg only, then darkened in photoshop (random ACE hardware spray bottle on my desk)
Right: Image ETTL in jpeg only, then brightened in photoshop
So both were matched in lightness in the end, both suffered exactly 1 edit, both had their full curve in the range of the camera.
The ETTL is abysmal, the ETTR looks fine.
I did not touch the focus wheel or move an inch in between them, only changed the exposure compensation. Neither one clipped on either side of the histogram. And the one on the right was at 1/1600th of a second with a 135mm lens, so that is not motion blur (the other one was at 1/100 for comparison).
This is not a surprising result to me. The reason why ETTR works is equally as applicable to jpeg mode as it is to RAW: the file format has more data slots available in the higher stops of the histogram than in the lower ones, since number of lightness values per stop is an exponential function, not a linear one.
The bit depth (8bit jpeg or 16bit RAW, whatever) is irrelevant, because this fact is still true at any bit depth, and the number of values available at the left is going to be terrible no matter what your bit depth (maybe if you had a 500 bit camera or something, it would be fine, but nothing within the realm of reasonableness)
By the way, this image posted earlier is a
brilliant depiction of why to ETTR (if light allows):
View attachment 66354
See how those bars get super spaced out over to the left? That's because the lower stops of the range ONLY HAVE 1, or 2, or 4 lightness values available to them.
Look at the numbers just below each graph. That is as precise as the data gets to the left of the histogram! If you were to expose a narrow dynamic range image to the darkest (leftmost) 3 stops, your entire image would be posterized to
7 lightness values total, which would be absolutely horrendous. The spray bottle image above is almost that bad -- that's what ETTR looks like in RAW or JPEG.
Notice that to the right, though, the data comes in thick and plentifully. That's where you want your image to be. Not chopped up into the sparse wasteland of data on the left. As far to the right as possible, where the most data is, short of clipping your highlights.
The rightmost stop in this image (for what I'm guessing is an 11 bit camera) has 1024 lightness values within it. the leftmost has... 1.
Which of those sounds like where you want the bulk of your image to be?