How can you compare two characters importance wise when they had different jobs and roles? From what we know Joyboy was alive 800 years ago and most likely lost the war against the rebellion/rulers which became the WG. Ryuma at most was 400 years ago (the canon material iirc says that he was alive a couple hundred (centuries) ago. Ryuma was a native of Wano from what we know being a Shimotsuki (or the clan started after him, idk).
Joyboy was meant to be a liberator (maybe he was the head of the rebellion). After the war Wano was closed off to the rest of the world as far as we know. And it was to remain closed off until the next Joyboy comes. So Ryuma's job was to defend Wano's borders and keep it closed off to the world. And he warded off/defeated anyone who came whether they were WG or pirates. Even after his death nobody messed with Wano, he put the fear of the samurai in the rest of the world, people not even from Wano had heard of his legend iirc.
Power wise we have no idea, both are considered gods (sun and sword) but most likely Joyboy should have been stronger but we can't know for sure. Maybe the reason the previous Joyboy was unable to win was because he did not have his partner (Ryuma) by his side. And the prophecy and why Toki jumped to this timeline was because all the winning factors would be together at the same time, 2nd coming of Joyboy, 2nd coming of Ryuma, Poseidon, Pluton, Uranus, Kozuki heir etc. and their leader would be Joyboy. However someone who has already been working to liberate the world against the WG and doing it deliberately is Monkey D Dragon.