A tone equalizer in darktable ?

don’t hesitate to display the mask (last icon in masking tab) in order to understand what it is doing. General rule is : the sharper the mask, the more you might destroy local contrast. So the trade-off is to find the parameters that makes the mask piece-wise smooth while also following edges.

For example, I find that good smoothing diameters lie between 6-25 ( of the largest image dimension), depending on the size of the features to mask. Small feathering factors (1-2) make the filter behave like a simple box blur. Increase it, and it follow edges more closely, but you might loose the smoothness inside surfaces and make details appear in the mask (thus disappear after the exposure equalization). To alleviate that effect, you can increase the mask quantization to 0.5 or 1 EV, but that’s not always suitable if you got blur/bokeh in your pictures. The mask iterations help refining the mask contours, but will cost some performance and they will remove contrast in the mask (so you need to boost it in the mask pre-processing).