He just vibe-repaired cars!
Joke aside, it was not shoeing horses but also working on the carts, etc. Probably bikes too. So at least he reused some mechanical skills, and probably tools, he already had. Only the engine was really new.
And many people living in small villages back then had basic knowledge in many disciplines, including electricity. When you had a farm for instance, you needed to be able to repair yourself anything.
And he was probably very inquisitive too. Great story.
This happened to my grandfather (blacksmith to working on cars and motorcycles), who was illiterate. From what I gather, it was a lifetime of trial-and-error-and-keep-what-works.