Definitely a connection or ground issue. I would probably start with loosening the ground bolts, cleaning and re-tightening. Something is very marginal so you might not even see an issue but loosening and tightening connections might be the fix. I use Deoxit D5 for everything electrical, good stuff. I doubt you will have any codes for a freak issue like this though.
Afterthought... does you car have an immobilizer with the alarm thing? I had an E31 8 series with issues it would crank but not fire. Took 3 months to cut the anti theft wire and was good. Perhaps if you have an anti theft security system it's causing the no crank issue?
95 E34 530I V2.37
===========
Those who make peaceful revolution impossible will make violent revolution inevitable.
John F. Kennedy