Not "the" answer, just a first reaction from a self-considered novice:
I'd think that your file system may have become corrupted. This would
explain both the freezing and the loss of files.
As a cause of file system corruption I could imagine loss of power
before any buffers could have been flushed.
I'm ready to stand corrected and learn about both the cause and the
solution!