The way I check lambda sensors is get a multimeter if you have one set it to resistance setting unplug your second lambda sensor and plug in the positive and negative terminals where the two white wires (or same colour) are towards the connection side and see if there is any resistance there. If the multimeter shows no signs of life then the heater in the lambda sensor is gone. If it's showing some life then your problem is back to the wiring or Ecu.

Apologies for the bad explanation I'm not great on explaining things hopefully you understood what I meant..

I don't work on too many BMWs at my garage tbh so I couldn't tell you the cause of the top of my head. Hopefully that points you to the right direction anyway.