***** I am not a teacher *****
There was danger if the plan became known. "Lest," though, can add an element of danger or higher risk than "if." But in other cases, "if" could not be used as a synonym of "lest."
As well, my computer dictionary terms "lest" as being formal.
Student or Learner