Hi, this is my first post (but I posted same on the wrong thread - also a starter pb! sorry guys)! Info here is great! I hope I am not too late for your starter problem. It is a tricky one and reminds me of 2 things:
1. My beloved E30 318is also did not start at all (not linked to engine temperature though). Mechanic had to tow the car away thinking about changing the flywheel (£££'s). Luckily it was only the 'flywheel sensor' (whatever that means) at around £100 incl. towing! Maybe you could check your sensor? Your pb sounds more electronic than mechanical as it works sometimes ...
2. Funnily enough, your problem is more like the one I had with my other car, a Honda Accord (please do not laugh ...). The damn car failed to start whenever the engine was hot or ... if parked in the sun in summer!!! Then worked perfectly in winter! Unbelievable. After a few months we found out that it was the distributor - it got crazy as the temperature went up (engine's or exterior)! I changed it (the distributor: £300 new but £75 second hand) and problem was cured!
Even if not directly related to your pb, I hope my experience proves useful!