No cannot disconnect the solenoid, the solenoid needs to be turned ON to shut off fluid. You could install a manual brake line shut off valve.
https://www.amazon.com/brake-shut-off-valve/s?k=brake+shut+off+valve
Place the valve in line, before or after the valve. Once trailer is disconnected...