The symptoms you describe are consistent with a "misfire" that causes shutdown of an injector. If the SES light comes on when it's running rough, then one or more Fault Codes have been saved in the DME (Engine ECU) memory, and any such Code is still saved in Memory AFTER the SES goes out and normal running is restored (the injector is no longer disabled).
The DME is programmed to shut down the injector on a seriously misfiring cylinder to prevent fuel from being dumped into a cylinder that is NOT igniting that fuel, with the unburned fuel being dumped into the Catalytic Converter, which will damage the Cat or even cause a fire in the Cat.
You have an intermittent fault of some type, and whatever is causing the "misfire" is NOT always faulty. For instance, you could have a loose or corroded connection, in a wire or connector to a coil or injector, a plug or coil issue, an injector issue. Intermittent electrical issues take a LOT of time, diagnostic tests & thought to sort.
The FIRST step is to read any Fault Codes and Freeze Frame Data (engine conditions at time code was set, such as RPM, Load, Temp). If there IS a misfire, the fault code will tell you what cylinder has the issue.
You can then check wiring and connectors to the coil & injector on that cylinder. If nothing found, you can remove the coil from that cylinder and inspect. Remove the plug from that cylinder & inspect. Swap the coil to another cylinder (x) and the plug to a different cylinder

and see if the fault returns and follows ONE of those parts to cylinder (x) or

. Diagnosis is NOT brain surgery, but it DOES require logic and thought.
Most of all, it requires a scan tool. Ideally, you would like to have a laptop with INPA or ISTA installed, where (once you learn how to use it) you can get the same information a BMW specialist shop should be able to get. However THAT setup and knowledge takes TIME and experience.
So the more realistic choice is to get a simple, cheap ($35US or less), P-code (generic) scan tool (to connect to your vehicle's OBD II Socket), and be able to Read and Clear (need both) DTCs (Diagnostic Trouble Codes) or generic P-codes. That tool can be used on ANY make or model of vehicle to read generic P-codes. Here is an example from Amazon UK:
https://www.amazon.co.uk/Autel-Auto...8-6&keywords=scan+tool&refinements=p_89:Autel
Misfire codes for a 6-cylinder engine are P0301 through P0306 (the last digit indicating the cylinder#, 1 - 6). The Scan Tool will give you the code, it will give you the Definition of the code (e.g. "P0301: Misfire, Cylinder #1") and it will also give you Freeze Frame Data (separate function).
If no local shop or parts store offers free code reading, you really need to be able to read & clear codes yourself. Investing 30 quid and an hour or two of your time to read the manual and test how to read codes and Freeze Frame Data (as well as Live Data such as Engine Temp, Alternator/electrical system voltage, O2 sensor function, etc.) will save a LOT of time, money & aggravation in the future.
If you get/record Fault Codes, and also get engine conditions at time code was set (Freeze Frame Data), then someone here can suggest next step. NO ONE who understands auto diagnostics would try to replace parts without those starting points, from which other diagnostic tests can be done.
BTW, when it comes to auto diagnostics, NEVER rely on "Quick Advice."
George