This example involves more than “praised ruler = sun.” It also portrays the position of the other kings relative to him.
In “kaʾannaka shamsun,” the addressee is the subject and the sun the model. “Wa-l-mulūku kawākibun” compares other rulers with stars. The clause “idhā ṭalaʿta” completes the image of eclipse.
This is not a claim about astronomy; it makes a political or honorific relationship imaginable through a familiar visual scene.