The time needed to transmit and receive signals to and from a probe landing on the moon is significant.
Yes it is, which is why remote control landing was not attempted.
To program a device to land via a set program could not take into account any discrepancies for significant alterations in parameters, such as altitude, terrain so on.
This is not strictly true. Yes it is true that you cannot simply program the vehicle as if it were landing on a perfect sphere. What you can do is a) program it such that it will land safely on a variety of landscapes, and b) design some feedback systems in so that it can in effect 'see' the ground it is trying to land on.
You can achieve a) by programming a rapid initial deceleration then maintaining a speed that will not destroy the probe on impact with the ground no matter if it occurs earlier or later than the ideal altitude (say if it runs into a hummock or a crater).
b) is achieved by the use of systems such a radar units or contact probes, which tell the probe exactly how far away the surface is at any given time and command it to respond accordingly. The Apollo lunar module, for example, used both methods. A radar told the crew how high they were and how far they were descending, and the contact probes on the landing gear told the crew they had touched down. In Apollo this input was output as information on displays and the crew responded to it. It would not require a complicated processor to take those inputs and use them to trigger commands to tell the craft to do something, for example slow down if it is going too fast, or shut down its engine when it is just about to land.
And no, there was no way to avoid unexpected boulders, or the problems of inadvertently landing the craft in the edge of a sheer drop and having it tumble in. That's just the risk of the mission. A few years ago I attended a talk by John Zarencki about the Cassini-Huygens mission, in the run up to the landing of Huygens on Titan. In the Q&A session afterwards I asked about what would happen if the lander hit a rock and flipped over, and his response was the 'I'm glad you asked that' reply of someone who had hoped no-one would find the flaw in his plan. There was indeed, as he told us, no provision for such an eventuality and it was simply considered to be a risk that was acceptable. The mission would still yield usueful information during the descent.
To extend Jay's dark room analogy, you walk with your hand outstretched so that your fingertips hit the wall first. That way the impact is absorbed by your arm and not your face, allowing you to slow down before you hit the wall and do yourself some damage. That's the same principle as a contact probe under the feet of a lander. What that can't help you with, however, is the toybox on the floor that was unexpectedly left there for you to trip over, but to be scanning everything all around you for any obstacles all the way is a huge effort for the desired outcome, so you simply accept that as a risk.