The story has beed reused many times in Arts. One more example is in A Connecticut Yankee In King Arthur’s Court from Mark Twain (1890) and I am sure is many more examples
And now we know that the Incas had a sophisticated understanding of astronomy and detailed astronomical records and observatories. It is highly unlikely that trick would've worked on them, they would've probably predicted the eclipse themselves.