I have a 2002 X5 3.0 diesel (I live in Europe) and have had the same tail light issues as X5's around the world. MANY do have a corrosion problem for the brake light bulbs, usually at the contact point (bulb holder) or the circuit "board" metal (more likely).
Removing the corrosion with a Dremel grinder and (even better) tinning this with solder will resolve this, for a while. Read one.
The TRUE origin of the problem is heat from the circuit that will (over time) melt the plastic stand-off's that hold the circuit metal holder. The circuit metal will then shift or modestly warp, causing intermittent and then (later) permanent poor contacts and the brake light error.
This mostly happens to the brake light (bottom bulb) rather than reverse or running lights.
THE fix is covered in BMW SI B 63 08 07, which supercedes BMW SI B 63 08 08. It involves repair to support / glue the circuit board with a BMW plastic repair kit. The glue / filler itself is a Henkel product called Terokal 9225. Easy to do. I did the grind, clean and solder on one tail light - it gave me a year. I just applied the BMW type repair myself on both sides, MUCH better and more permanent fix. I had epoxy putty in my "glue collection" (Milliput) instead of Terokal.
Removal and repair is a 30 minute job per side, then wait for your glue to cure.
Do it and your E53 will entirely cease to give you spurious warnings. Next time it'll really be for burnt out bulb