You are on the right track.
Create a family with all 3 sprites. When any family member is created, save its UID.
Then when "undo" pressed you can destroy this family member.
The only problem is that it only gives you one undo step, but I'm sure you can modify this code if you need more steps.