Have you checked your battery connections? I know when mine were corroded somewhat I was having trouble transferring current. When you're tapping the brakes, would it be enough for the battery or the cables to shift slightly?
Does this problem only occur if you are moving, or can you tap on the brakes when you are sitting still and get the problem to reoccur?