Thats exactly the advice i was looking for!
I'd like to know how you do it personally (till you cant go wrong). Is it through repetition over and over again? Going back to a slower tempo? Varying the rhythm on hard passages till its 100% perfect?
Great, I'm glad it was on-par with your needs and at least a little useful.

Methodology can vary from person to person, playing on their strengths and against their weaknesses, and relying on the tools that individual has to accomplish their goals. With that in mind, I will try to discuss concepts that may be useful. One disclaimer to this process is that I don't use it for sight-reading. If I'm sight-reading, I pick up the piece, put it on the stand and start playing. This is the method I use to "study" a piece.
When I select a piece, chances are I've heard it before. I usually select pieces I enjoy listening to, so it is rare that I approach a piece I've never heard. However, if I haven't heard it, I do try to listen to it as early into the process as possible.
When I first look at the piece, I give it a read through before I touch the keys. Usually just a quick glance to get a feel for the piece. I want to know where it's going and what my fingers might be doing, what may repeat, and what looks technically challenging. I build a mental conception of how I want to approach the piece.
When I touch the keys, I give the piece a couple run-throughs. Usually 2-3. I find out what's going to go into my fingers easily, and what's going to take work.
Next, I work on the sections that will need the most work. I smooth these out before I do anything else. (I do this first because, if I don't do it now, I won't do it later, and it will take that much longer to learn the piece.)
At this point, I will piece-meal the entire piece together at a comfortable pace/tempo. I am really not concerned with tempo at this point, so that is why I use "pace".
If there are any rough patches, I smooth them out now.
If I don't have the piece memorized by now (rare), I now work on committing it to memory.
Once memorized, I work on interpretation and bringing the piece up to speed. Once at speed, I typically go back to about 60-70% speed and stay there. I perform at 100%, but rarely practice at 100%.
The most important thing to remember, for me, is this: I don't worry about "random" mistakes, but I make sure not to practice a "real" mistake. The difference is this: if I play it a hundred times, and it flubs once, that's a "random" mistake. If I play it 4-5 times in a row, and hit the same rough patch or wrong notes, that's a mistake I need to iron out so that I don't practice it wrong. I think that "random" mistakes are easy to correct/forget. But once a "real" mistake is learned, practiced, and committed to mental and muscle memory, it is excruciatingly difficult to get rid of it. The better your technique, and the more "freely" you play, the easier it is to get rid of, but it still means time spent correcting mistakes instead of progressing.
To try to address one of your questions more specifically, if a section is going particularly poorly, I take a look at the mechanical problems that contribute to the issue. Once the mechanical issues are worked out, the passage is fixed. But I don't typically vary rhythms or repeat and repeat a mistake until it miraculously fixes itself. I identify the mechanical cause of the mistake and fix that. Usually the cause of a missed note starts anywhere from one to several notes before the actual missed note. Identifying where is crucial to fixing the problem.
Here's the worst part about a "learned" mistake: it can affect more than one piece. If, for example, you are working on Mozart's Sonata in C, and collapse your hand during the scales, so that you do not play them evenly, then in every other piece featuring those scales, you will do the same thing. If you "brush" over the broken-octave melody notes in Liszt's Hungarian Rhapsody No 2, you will have difficulty with the opening of La Campanella. And so on. So, it is critically important to consider a "learned" mistake an error in technique, and not necessarily a problem with that particular piece.