Little update...
The message "TRANS. FAILSAFE PROG" went away by itself yesterday and has not come back, but this morning just to be sure I still took my X5 to my buddies at K&M in Glendale and they hooked up the diagnostic tools to the SAV.
After few minutes running the diagnostics, nothing wrong showed up with the vehicle. They tested the alternator and it checked out good, but then they checked the battery and not good. Went to the BMW dealer in Bayside to buy my replacement battery for $160 after using the shop's discount. So far its working 100% how it used to be, hopefully I don't need to deal with something like this for a while.