Most certification authorities dictate that any failure of the flaps that would place the aircraft in jeopardy shall not occur more frequently than 1 10e9 or once in one billion hours and that is for the entire fleet of a given type of aircraft. Yes, five times on the same aircraft would be considered excessive to put it mildly and two times on the same day would put it off the chart from a safety point of view.
I can see the aircraft being released for revenue operations after the first failure was corrected but after that the aircraft should have been grounded.
What type of aircraft was it? Perchance was it an A-310?