Maybe it's the Neutral Safety Switch in the gearbox. They get gummed up over time. Try flushing out the gearbox with some kerosene or remove the switch and clean it.
The
MAX BMW Parts Fiche calls it the "Idle Switch", and it's located at the lower rear of the gearbox housing. See Diagram 23_0760, item 16.