The Audi is a different animal to Bimmers. I suspect you will be disappointed with one if happy with the 5er.
Volkswagon absolutely bends one over for service and parts which are needed frequently.
A new or nearly A6 may be preferrable to 17 yr old 5er with 200k due to freshness only.
It sounds like you keep cars a long time, the 5 at least, so resale won't be an issue if you wind up liking the Audi. If you need to sell one you will soon find yourself having a firm grip on it unless willing to sell cheap. If you go Audi, lease it. In fact comparing lease costs may be a good way to establish residual value of different models.
You have asked in an obviously biased forum. However I have experience with both and will never own another Audi for reasons above.