there were also E34 with batteries under the hood, at least EURO versions. But 525d: which model and built year?
https://en.wikipedia.org/wiki/BMW_5_Series