I don't mind fixing the bad wiring, but I don't really know what/how to fix. Are you talking about the brake light errors? I could try tracing the wires for continuity. Could be a problem with LCM.
I accidentally damaged my MAF sensor and now my transmission is jerky and I get code P0102. Same symptoms as here
https://xoutpost.com/bmw-sav-forums/...af-sensor.html
Well at least I know the MAF sensor was working so I'll replace it and this will be easy to fix.
I found another user who had the trunk lid open when turning off headlights.
https://xoutpost.com/bmw-sav-forums/...unk-opens.html
Looks like a problem with the switch.
I'll replace the broken hose tomorrow. When the car was running, I put my finger over where the hose connects to the back of the engine and felt some suction. So that hose definitely does something.
Tried driving after cleaning throttle body etc. but still the same issue.