You seemingly have already clipped the background apart and treated it separately. That's OK. Keep different things in different layers to keep the task manageable.
You can insert one or more curves adjustment layers which have layer masks to focus the effect only to the area where that curve fits. I inserted only one to show the idea. One can paint black and white directly to the mask. I put there a gradient and then painted manually some white more.
If you have say 3 different curves with different layer masks making light and shadow to the machine you can either lift the background above them or more preferably keep the machine and its adjustment layers in a group which has blending mode Normal. That keeps all adjustments inside the group.
The background and its own adjustment layers can have the same.