The real pros, that is those pianists who were also composers in the 19th century, were required to have two teachers. One was for piano, and the other was for theory and composition.
When they were very young, they copied scores for their teachers of all of the great composers. Then, when they got older, they composed their own pieces.
The bottom line is that these "musicians" knew their pieces inside and out. If you have written out the harmony to your music above the staff, and you have it reflexively in your mind, even if you temporarily slip up, you will know where you are and be able to go on just fine.
Most peple have major memory slips because they really do not know their music. Accordinlgly, I have to share a personal story on this which has to do with my high school trigonometry class.
One day we showed up for class and Mrs. Collenback announced they she was going to give us a pop quiz.
We immediately freaked because we were the geeks in school. We did our homework, and we were good kids. Therefore, we did not have to be punished wih a pop quiz.
So, sweating bullets, we took the short test, which was graded immediately thereafter.
The highest grade was a 76 which was made by the school valedictorian. I thought the guy was going to die right there on the spot.
Next, Mrs. Collenback announced that this was not going to count aginst our grade average. She then said that she had done this to make a point about actual learning.
The test she had just given us was the same exact one she had regularly given us two weeks earlier, and that is how much we had retained since then.
Understand!!