I purchased my extended warranty based upon my concern about something going wrong with the transmission after research and searching these forums.
Well that worry did come to light. About 2 years ago I had the transmission reprogrammed for the shifting issues discussed earlier which never really helped. Then it started to hiccup every 5 seconds at a specific speed which came and went for the last year.
I finally got it diagnosed as the mechatronic module and had it replaced (this month), under my 3rd party warranty. Cost of repair was $4,200 and I paid $100 deductible. I paid $3,600 for the warranty; I win!!! (from Security National). Now that the part is replaced I don't have the shift issues and the hiccup is gone as well.
I think the X5 drives better than it did 2 years ago.
I believe a '04 or newer X5 is the way to go. Get it inspected, know the history and consider strongly a warranty for the big items. My .02 cents.