BMW X5 Acceleration Rearend Knock

My wife just handed me her 2001 BMW X5(165,000 miles…new engine at 97,000) because they offered only $2000 on a trade-in. It still looks great - better than my Tundra with numerous whiskey blisters delivered by misbehaving cows. The Beemer tires are in good shape BUT the car has developed a loud knocking noise in rear end when you accelerate from a full stop (scares the heck out of you because it sounds like the backend is going to fall off). If you accelerate slowly it doesn’t always knock, but other drivers try to run over you. Just had the air levelers repaired. My local mechanic thinks it is the drive shaft but not sure and won’t touch it until something breaks or falls off. My question is - if it is the drive shaft and it falls off while driving - is this going to be a dangerous problem? Our mechanic doesn’t seem too concerned and just doesn’t want to tear it apart to check the noise. If possible (financially) I would like to repair it but will have to drive it to a bigger town to have it done. Or should we just throw in the towel and donate it to NPR?

BMW has a multi link rear suspension so I would assume there are many end links that could be worn allowing excessive rear end movement. Not so much a driveshaft issue, but it could also need new u-joints

Multi-link or maybe engine/tranny mount allowing things to shift around. Is it wheel speed dependent or rpm dependent? If it’s rpm it could even be the exhaust shifting and banging against the under body.