IMO, the best course of action would be to not ridicule or reprimand them but explain how this wasn't the best course of action and then clean the toaster together with the kid - that way they learn how to do it and don't feel like an idiot. And you don't have to fume over what your kid did wrong but spend some time together.
Obviously, if your kid actually IS dumb and reckless, things would be different.
I don't see it as a punishment to make the kid stick around and help with the cleanup to the extent they can; rather, it's an attempt to practice conscientious habits (if you make a mess, you stick around to see it cleaned up even if you need help to do so), in addition to the specific learning experience that some things are really hard to clean, so we should be careful in our experiments with those things.
I'm not (currently) a parent, so this may be off base, but I am currently in the crunch part of the process so looking to learn:
Is there not a better opportunity for this to be a learning experience by making it a couple of hours of your kid's time to do that cleaning? I know my adult life has benefited from my parents' insistence that I clean up my own messes, and 12-year-olds are certainly capable of generating elbow grease.