I saw a YT video a few months ago and should have saved it and now I need it. It may have been about using Photoshop but the technique should be generic.
The issue is, I have two photos of the same subject (taken using a tripod) at different exposures because the sky is nice but bright and the foreground is nice but darker. There is a pretty hard line between the two, a line of trees. The video talked about how to shape the line between the two so when the two exposures/layers were blended, there were no halos and the shape of the mask was accurate. Did the video creator use something like a high or low pass filter? I don’t know, I can’t remember.
However, once the mask was created, there were portions that weren’t black so it was painted black, which was fine, the critical part was creating the edge accurately.