My money's on the starter motor. Engine condition is best judged by cold starting. Even with a warmed up engine, if the starter is not turning the engine over at a good clip (I have heard 100 RPM on this forum), it won't start. Even though the starter motor is at rest it does soak up engine heat, and I suspect you have a heat related problem with starter motor.
1982 240D Manual - Sold