If the bot misses a merit tx, it will be off by that value until manually fixed.
Isn't this the part to fix? I assume you use
Recent merits, which currently shows the 497 last Merit transactions going back almost 40 hours. If you scrape this regularly, you shouldn't miss any Merit.