Knowing it's Role in the Story is enough & we know that it's a Power made to counter DF Users
It's obvious that Oda created Devil Fruits & Haki together, that's why he created Logia & didn't hesitate to introduce it Early
Author creating a story where he imagines Roger or Shanks using Kairoseki to be able to fight a Marine Captain from East Blue is too ridiculous
Maybe it's possible he decided to name it "Haki" later on & created Three Types for it & thought about other Advanced Techniques & Uses .... etc but the concept of a Power that can be used to fight DF users is obviously planned since ever
It's everywhere in other Manga anyway. Like Nen & Ki & Chakra ... etc
He introduced Logia early, gave 4 ways of fighting them.
Counter Element. (the third Logia we saw, Ace, was defeated because Magma>Fire)
Kairouseki. (Appeared together with Smoker, the first Logia we saw, put in his Jitte. He was trapped inside the Kairouseki cage in Alabasta. So Kairouseki works against Logias).
Gimmick, like water for Croc, or rubber for Enel. (The second and fourth Logias we saw)
And he also introduced the Yami Yami no Mi.
4 ways to deal with Logias that don't rely on Haki were introduced.
But sure, he created CoA as soon as he created the Logias.