This is a very common issue - search "brake light" and you'll find a lot of posts. (fyi - I prefer searching through Google instead of this forum. Type "brake light xoutpost")
It might be the bulb holder, but it's most likely the light assembly. Even if it doesn't look corroded, what happens is that over time the plastic holding the metal contacts disintegrates (melts) resulting in the socket no longer making contact. This is where you'll find lots of posts where folks stack up a lot of solder in order to gap the space and recreate the contact. Your comment saying that the socket was loose would be a good indicator of this.
Another option is the Mercedes brake light mod (search that). M-wagons from that era have the exact same stupid design, and MB offered a fix that bypassed the light board altogether. This is a very permanent fix (I just did it over the weekend after my solder job failed - again). And it's pretty cheap:
https://www.fcpeuro.com/products/mer...des-1648260007
Regarding the LED 3rd light - I took a chance and bought a used one off of Ebay for $20 or so. Tons of these cars are in scrapyards by now, so parts like these I'm pretty comfy getting used.
__________________
Rusty, Beater 2001 X5 5spd
Previous:
2017 VW GTI
2001 E46 Wagon (manual of course!)
2000 VW GTI (I see a pattern emerging)
a Saab, and a couple Volvo's thrown in for fun
steve at ogracing dot com