Back on topic:
Don is right on that the problem in the OP was most likely cause by a loose connection with a glowing arc or close to one.
While we all know an AFCI will not detect a glowing or series arc and would not be of any value in such cases I believe a thermal fuse or even a bi-metal contact that is electrically and thermally connected to each and every point of termination would, it wouldn't be hard or costly to manufacture devices such as receptacles and switches or other types of devices with a small thermally sensitive contact that would open if any heat above a certain temperature was to occur at a termination, a simple bi-metal strip between the plate with the side screws and the contacts inside of a receptacle that would just pull up and disconnect the receptacle and the load connected to it would stop it from getting any hotter and it could be designed that it would it would require intervention (reset that required the removal of the receptacle) and the re tightening of the screws before allowing to work again, while not many fires are cause by this some are.
I was thinking about asking a friend at UL about this if something like this would fly?
Of course a differant aproach would have to be developed for wire nuts but then again if they are installed correctly to begin with we wouldn't be seeing burnt up wire nuts.