Hi Joachim, Kaldi's story is pretty standard. Still, it's most likely a legend or a narrative account of a somewhat more complex cultural and historical process.
Researchers like Jonathan Morris have tracked coffee origins to Ethiopia. The Oromo people -more specifically- made all kinds of concoctions and food with coffee beans, including bunna qela, which is something like a natural energy bar.
The actual beverage took centuries to develop, and most authors claim that Yemen was the cradle of coffee as we know it today. Arguably, Sufi monks were responsible for developing coffee as a drink, roasting coffee beans, and grounding them around the 15th century.
The beverage was part of religious rituals, mainly focused on connecting through prayer with Divinity.
Historians claim that coffee stimulant properties helped keep monks awake longer and with enhanced focus, making them early adopters of coffee as a beverage.