2010 X6 xDrive35i Choking/CEL Upon Hard Acceleration

I have been having this issue for the past few months:

When performing hard acceleration, such as entering on ramp to highway or passing a truck, the motor "chokes" and almost feels like it will stall before not changing gear to downshift. Then the Check Engine Light will come on. Drivetrain goes into limp mode sometimes as well, depending on how hard and long I push the vehicle.

After driving for several miles, the Check Engine Light will go off automatically. If the accelerator is not pushed hard, it will shift no problem and no CEL is triggered. Additionally, I notice that shifting in DS Sport mode give me a bit more power, but the same behavior occurs. Strangely, when in MS Manual Shift mode, it does not appear to be as prevalent or at least I have not had the vehicle exhibit the same behavior.

I have previously hooked up OBDII and read codes. I keep getting a misfire on Cylinder 4.

I have replaced all spark plugs and coils this month. I have had this inspected by a mechanic afterwards confirming everything was installed correctly. Cleared codes, and still same behavior. I have checked to make sure all coil wires are attached and all vacuum tubes are attached.

I am at a complete loss here after months and looking for expert guidance. The shop wants me to perform a "pressure test" on cylinder 4, but I really don't think it is truly cylinder 4 issues -- after reading many forums posts and such that seems to be a standard code thrown when other things are happening.

Of note, I had the the front oxygen sensors and all fuel injectors replaced last year. I also had the High Pressure Fuel Pump replaced by BMW earlier this year under the Internal Repair Bulletin. I don't feel these would likely be part of the issue, but thought I would mention. I have maintained the engine well with regular synthetic oil changes and most recently had the walnut shell blast done since the car has 117K miles.

And I don't know if this is separate or related, but I also hear a fast tapping/rattling sound coming from the engine when I give light acceleration -- especially on a hill. When inside the car, it sound like it is coming from the passenger side of the engine. Is it a belt? Something else loose? Or something else possibly related to the other issue?

Any advice or guidance for others who have experienced this or related symptoms and how they troubleshot it would be much appreciated! If there is anything I can followup with here that might help someone provide better feedback, let me know what that is.