I think generally it's a very good idea! Like others, I think "10 times in a row" is more shorthand than rule. You want to get to the point where you are not making the mistake, and start reinforcing the correct tone/feel/timing/muscle memory so that you don't immediately revert back to the habit of the mistake.
I think after that, my own tactic is to stop for 30 seconds (I usually check email on my phone), and then go back to it and try another 5-10 times. Then, I move on. At the end of the practice session, I'll go back to that passage and get it down another 3 times. If I don't get it right all 3 times, I don't stress about it. It just a signal that I have to do the same thing next practice session. After 2-3 days, the passage does come together, and it's harder to play it wrong than to play it right.
But the core idea remains: practice it slower, break it up so you are going note by note or half-measure at a time, until you aren't making the mistake, and drill that correct playing until it can become a habit.