Hi,
Does sound like the LKM, which controls the lights, is acting up; a fairly typical problem on the E34. The solution is to pull it out, reflow the solder joints (which crack with age, giving intermittent connections) and reinsert the module.
Most of the time that cures the problem.
Regards,
Adnan