If you fail to pickpocket Ramien and beat him, the game would act like you didn't beat him and give you the options to talk to him or pickpocket him as if the fight didn't happen. So you could fail to pickpocket him, fight him, and chose to pickpocket him again to fight him endlessly.