I was going to suggest to use the same approach as the old CD tagging systems. Count the number of words in each chapter to create a "book fingerprint".
It's highly likely to be globally unique, and it can also help with the missing forewords/afterwords/bonus content sections.
In addition, you can also add fuzzy matching for the title.