The manual recommends getting mid-tones right for scene-referred workflows first. I have also read that darktable-elegant-grey is near middle-gray so it is useful as a comparison.
I have a couple of questions though — apologies if they reflect some misunderstanding.
Are we talking about the J channel?
Is it possible to preview the lightness of the image (the J channel) directly while adjusting exposure? I am aware that I can open the parametric mask controls and press c over the relevant channel, is it would be useful to just view that while adjusting exposure.
Which part of the theme should I be comparing middle grey to, the area surrounding the image in the darkroom?
I just use the color picker…with live sample…and click to expand the swatch…it ends up being right next to the border so you can compare or adjust pretty easily
Why do you want to compare your midtones to the background?
Getting mid tones right is about getting those exposed as you want to end with - if your midtones should match 18%grey, you can do this. If you like to brighten or darken them later, do it in this step, not later.
The intention of the recommendation is: set exposure of your main object (most are taking photos of objects, not midtone values) to match your expectation (the black cat isn’t 18% at all)