Ok, so actually I have a lot to add to this thread! I too wanted a much more modern infotainment setup in my 2000 540i and am very pleased where I've gotten things now, so hopefully someone will find this useful:
1.) Headunit - I use this Eonon unit. 2 major advantages with it are that the steering wheel controls work perfectly, and it sits flush to the dash unlike almost all of the other similar units that are curved to fit the X5 and while still fit, look dumb in the e39. (Looks like there is a more updated Oreo unit now available, but I can't speak to that one, just to the older one I currently have):
2.) Software - Unfortunately while the Chinese hardware seems adequate, the software is basically crap. Fortunately with Android being open source, there's much more capable custom roms available. I use this one from Malaysk, HUGELY faster/more responsive, more customizable, no bloatware, etc:
3.) AndroidAuto - This part really shines. For $6 from the play store you can get this emulator to run AndroidAuto on any Android receiver, and it works marvelously. Now I get into my 18 year old car, plug in my phone, and just say "Hey Google, navigate to (destination of choice)," or "Hey Google, play (musical artist of my choice)." Can't beat that with a stick!
If you're an iphone user, sorry, you chose the wrong side, and thanks to Apple's love of being proprietary and the fat middle finger they give to anyone who wants to try to tweak with their stuff it's much harder to get functional CarPlay. However there's a place the advertises a USB dongle with a CarPlay port on it for use in Android head units. No idea if/how well this works, but just including it here for information:
AllGo | CarPlay