This sounds like intermittent issue. There could be two possibilities from what I have seen with others in other forums.
1). Neutral safety switch or brake stop light switch under the pedal could be faulty. It may not seems related but some autos have such behaviour with faulty neutral safety switch. Stop light switch could be culprit if it is related to neutral safety switch. On some autos it does.
2).
ABS units are mounted on a bracket that hangs down with not much support causing lot of vibrations to the unit. These vibrations cause premature wear and tear. In such cases it's the
ABS control unit attached to the pump and not the pump itself.