The most direct approach, and also the best approach, is to just avoid high levels altogether.
Pathfinder tends to break down at high levels. The might of 7th, 8th, and 9th level spells is just too immense, too world-changing—true resurrection is a good example, but so are things like greater teleport and gate. (There are more; the list really does go on.) This causes problems for the narrative, and it can also cause problems in gameplay, as non-spell options (e.g. feats, rage powers, rogue talents, and so on) simply do not keep up and this can cause problems evenly challenging the members of the party.
So you can solve your problem with true resurrection, as well as a host of other problems in Pathfinder, many more pernicious than this, by keeping to low levels. This does not have to mean sacrificing your epic story! The power-levels of high-level Pathfinder, at least for the most powerful classes, are mind-bogglingly immense. Most of our epic tales, our mythology, our fantasy novels, and so on, do not operate at such heights of power. Based on what he accomplished, Hercules for example would probably only be around 8th-level (probably best modeled as a barbarian or fighter around 6th level with a custom Strength-boosting template). Even full gods in many mythologies pale in comparison to a high-power, high-level Pathfinder character. As such, most narratives do not actually need those high levels—indeed, they have problems accomodating them, because overpowered spells trivialize too many of the challenges, as you found with true resurrection. By 15th level or so, “saving the world” is often rote and routine—not actually an appropriate challenge.
Instead, we can replace increasing levels with other forms of growth and advancement, to maintain the sense of progression and improvement for characters, but without reaching into the heights of Pathfinder’s highest levels.
For example, using the E6 variant (wherein the level cap becomes 6th, but characters continue to gain bonus feats as they gain more XP thereafter) is a popular approach, and in an E6 world, even raise dead is challenging to achieve (requiring some kind of plot-enabled special ritual, as there simply aren’t any spellcasters capable of simply casting the spell). E6-like variants cutting off at other levels, or using other forms of growth than bonus feats, are also possible.
Another approach is the one taken by the Eberron campaign setting in D&D, where the greatest people in the world top out at around 12th or 13th level—so by the time the players are around 10th, they’re already dealing with the kind of world-changing/saving stuff that is usually associated with higher levels. Campaigns don’t typically continue past, say, 14th level or so, and if they do, the PCs are like gods, powerful movers and shakers and the game becomes very different (and a system other than D&D or Pathfinder is recommended to handle this new type of game and its challenges). Again, though, true resurrection is extremely difficult to come by (only a couple of canonical characters in the setting are capable of casting it).
If the actual number written down on a character sheet is important to you in terms of achieving an epic campaign, consider limiting characters to the spell progression of bards and other ⅔ spellcasters. These classes fall in a very nice “sweet spot” in terms of Pathfinder’s design, and avoid a lot of trouble. You can even allow full-casting classes to people—as long as they multiclass enough to keep their spellcasting in line with ⅔ spellcasters.
Anyway, you haven’t described the setting you’re playing in, but the kind of campaign you are talking about simply doesn’t make a lot of sense in the kind of super-ultra-high-magic world that Pathfinder’s rules make reality at high levels. I think you can avoid a whole host of problems—from balance problems to narrative problems within your setting—by preventing those kinds of spells, and power levels that high, from even existing in the first place. It may be less work to rework any plans you have for high levels to use low levels, because the system will better support your goal (or it won’t be, if you are using an established setting that you would have to rewrite to use lower levels—that would obviously be a ton of work).