Do your research diligently. research by asking trusted mechanics, google searches, ect on the transmission you may potentially be buying. Look hard for an answer you may not want to hear.
The first response by fun2drive is a sound one....and it is based on knowing a few things.
-the car has not been abused
-the car has been well maintained
-the fluids of the car ARE NOT lifetime and have been treated as such
Try to get the service records if you can. this will tell you alot about the car, the owner and their habits. Has the car been brought to a dealership and babied, or taken to Joe schmo auto wreckers for its oil changes.
Two fluids that are forgotten about more than they are remembered are Tranny fluid and powersteering fluid. Both need to be changed at regular intervals along with the more commonly known brake, cooling, oil and differential(s) fluids.
One other note, the transfer case fluid after 40-60,000 should be changed too....(XI only)....
I am battling transmission (GM) issues now and understand your concerns.
If you can drive the car past the point to where it is warmed up sufficiently...that means not just the motor, but the tranny too!.....and all is well...then you have a better chance of finding most problems.
Drive the car if you can!....Take a mechanic friend who knows BMWs......you are about to invest pretty heavily in your next mode of transport......