Look at every text editor, for example. They save every single letter you changed (or they should), but generally they group the saved letters by words. I would do this for your program. Instead of saving every tiny change, group together a few small changes. But you have to be careful because you need to only group small changes, as larger changes are far more significant in some cases.
However, my way is still flawed because some smaller changes might also be important. Maybe instead of saving them to memory, you should save them to file. Open a file when the program is started, assign every joint an id and then use that id and save the new modified joint angles/positions/whatever else to the file. When the user presses the back button, simply loop backwards through the text file, getting every id and then assigning the old attributes to that specific joint. When the user exits the program, close the file.
Optional: Save the file to disk when the program exits, or at regular intervals so that if the user experiences a power outage most of their data will still be there.