It seems that the Joyboy knowledge that Kaido got may have come from King
Since King comes from an ancient race that was usually sitting on the Red line, it makes sense that he could have known Joyboy's legend
Guess he was looking for the next reincarnation of Joyboy as a way to change the world from the world government's doings, particularly after what happened to his race
He thought it was Kaido, but ultimately ended up accepting him whether he was Joyboy or not after observing Kaido's way of wanting to change the world, as long as he remained the strongest, with him wanting to make him the pirate king at all cost for his perspective of the world to change
With Kaido realizing at one point, he couldn't become Joyboy, hence his statement towards Luffy stating "he wasn't Joyboy either"
Guess after this battle, Kaido will end up realizing that Luffy is indeed Joyboy