Depends on a lot of things.
First, are you using an eink version of a kindle? or a Kindle Fire?
If you are using e-ink (and therefore can't use pdf easily), I would recommend buying ebooks from Oreilly or Packt Publishing. They're very expensive, but at least they will format properly for an eink device.
(by the way, both companies have pretty good ...
Learning to develop apps for eBook readers is very practical:
The reason being, the same technology that applies to creating ebooks; also applies to developing websites, software, etc.
Meaning that the skills you learn from developing apps for eBook readers improves your overall skills as a Web or App Developer in general.
These skills in turn can allow ...
Define what is: "fix it at the first place".
If you want to fix wrong output from OCR analysis, a simple solution on an infinite set of TOCs you will never make.
You will never apply all variations. You would have to create a machine learning algorithm that would analyze each TOC variant.
Or count substrings of the same characteristics (in simple TOC).