One campaign I played in, a major plot point revolved around an ancient civilization that was so upset about a prophesied End Of The World that they constructed an elaborate catacomb with a permanent Gentle Repose effect on the entire complex. Heroes close to retirement would commit suicide and be interred there, generation after generation, building an army meant to rise en mass at the final hour to save the world. Our party's role was first to recover the artifact horn the supplied the Mass Resurrection effect when blown, then to convey it safely to the hero's tomb and blow it at the right moment.
Of course, that wasn't the whole nor the end of the story, but it was all very epic and Arthurian inspired.
Petrification is another way to preserve someone in a not-dead state for hundreds of years, though they must have been alive when they were turned to stone to get around the resurrection time limits this way.
Well, if you want a solution that attempts to stay within the rules and does not rely on casting a "big wish":
1. Cast gate and name the target creature. It has presumably become some kind of petitioner (e.g., a lemure, manes, einherjar, etc.); gate allows you to reach that petitioner on the plane where it resides, and call it forth in its physical body.
2. True polymorph the petitioner into humanoid form. Maintain concentration for the full duration.
3. Kill it. Because true polymorph was sustained for the duration, the conditions for ending it have been overwritten with "until dispelled." So the petitioner does not revert to being a celestial/fiend/whatever on death. It remains humanoid, and is thus a legit target for:
4. Reincarnate on the remains. The petitioner is reincarnated as a humanoid. True polymorph can now be safely dispelled.
5. If you get the wrong race, kill it and reincarnate again. Repeat until you get the right one.
Of course, this presumes that the petitioner has not already been destroyed on its home plane in the interim. If it has, you're out of luck. Also, petitioners often get mindwiped, so there may be some psychic repair work required... in fact, there probably will be anyway, given that this scheme relies on murdering your target multiple times.
(Getting the players to understand that this is the villain's scheme would be a truly heroic feat of DMing.)
As the DM, you can do anything. Raise Dead works as the speed of plot. The great thing with NPC magic is that it can do anything, even things PCs cannot do. If you want to say that 1000 people all chant and give their lives to let this ancient person live, then great, do it.