Not sure this will work in PI. The general philosophy is to avoid selecting parts of the image for selective enhancement. I doubt such a tool is on Juan's list, but I could be wrong.
Hqve you tried using the Dark Structure Enhance script. It is in Scripts> Utilities. Be sure to check the box that makes the mask so you will have the mask to operate on using curves or histogram. I run the script and then undo the result on the image so I can adjust the mask and apply it then use curves or histogram on the masked image. Hope that makes sense. Sometimes just running the script will produce the desired result.