When considering the character arc of villains and secondary characters, how that arc resolves is often considered in relation to the hero/protagonist. That does not have to be the ultimate determining fact, though.
It is all right for a secondary character to start and/or end up in a better position than the main character. If a secondary character is better suited or more qualified to rule or win or gain a benefit, then it is logical that they would unless the writer provides a good enough reason for a different outcome. Secondary characters should be allowed to act on their strengths and fail or struggle based on their weaknesses. Don’t limit a secondary character’s arc just for the sake of making the main character look better.
It is also acceptable for a villain to reach a resolution that is more positive than expected. Part of a villain’s character arc may be self-improvement, so a better-than-expected resolution may be warranted. It may also be the case that an equitable ending between the villain and hero is not the most reasonable or desirable outcome for the story.
The hero (or villain) does not always have to end in that role. Switching roles are altering a main character’s path can be an important element of development for that character. Allow his or her traits and personality to determine the path taken, rather than locking him or her into a particular role.
When writing a main character, it is often necessary to divulge a great deal of detail, going into backstory, motivations, thoughts, and feelings. When developing a secondary character, it is often necessary to be more sparing with details due to space constraints. That doesn’t mean that these characters are incomplete.
Revealing fewer details can work to your advantage and help you create some mystery and opportunities for future development in later stories or chapters. Reveal details about a secondary character that are pertinent to the main storyline or main character’s development. Hold back other details, but do so in a way that motivates the reader ask questions and wonder.
Give enough details about a secondary character that the reader can understand that character’s personality, culture, place in the story, relation to the story and main character in time, and his or her potential character arc. Leaving out more specific details reminds the reader that there is more to the story and makes the story world feel more realistic because it extends beyond the immediate storyline.