Batteries usually don't last 10 years...so I know we can exclude that it's a 1993 540.

Have you unlocked your OBC...if yes, then do a TEST #9 to see what your battery voltage is...then start the car and do TEST #9 again, and it will reveal how your whole charging system is doing.
At rest, your battery should show at least 11.5v-up....running, the system should display 12v-14v. If the test reveals your voltage below these numbers...then your battery is starting to fail.
I would have posted instructions on how to unlock the OBC...but the instructions for the e34 & e39 are different. Hopefully the importance of model identification...other than typing 540i...is sinking in...especially when the model number ranges between 2 different 5 series styles.
I'm sure you can find the instructions in the archives, too.