New Sigmoid Scene to Display mapping

If there was not enough control in the masking tab of the rgb color balance module I think you should start a new thread and get/provide feedback tips. I have not played with it that much but it seems highly controllable to me. Perhaps your use case will provide a source of discussion and indeed reveal if there is a deficiency or use case not being met by the current capabilities…

EDIT or you could take this approach and make presets with luminosity mask using the parametric masking in your module and create presets for the tonal ranges. Then every time you want to hit one of them you could invoke the preset for that range Luminosity Masks in darktable | darktable

You can setup as many levels as you want …this classic article does it in GIMP and creates three levels for dark, mid, and highlights GIMP - Luminosity Masks