OK, I assume you teleport back to Xyz Temple, get raise dead cast for you, cast restoration, wait a week, cast restoration again, and teleport back here. It takes... [rolls a d20, saying “1 week” unless it is a nat-1, in which case saying “2 weeks”] to get back to where you were. You spent the week of downtime doing favors for the temple to cover the costs of raise dead. [Person who can cast restoration], you’re down one 4th-level spell slot because you just cast restoration, and [person who can cast teleport], you’re down one 5th-level spell slot since you just cast teleport to get here.
Now that takes just about the same minimal amount of time as curing someone who got knocked out.
How did I determine this?
Remove things that waste time
Various parts of this process aren’t adding anything to your game:
Figuring out how the party gets to the appropriate temple if teleport misses. Even if it misses, most likely the party isn’t terribly far away from where they wanted to be, and is in no particular danger getting from there to the temple.
Figuring out how much the party is paying. The game expects a certain general “wealth” for a party of a given level, so by spending this money, the game expects that future loot is bumped up a bit so they can “catch up.” As such, the expense is a temporary one, and not worth worrying about. At levels where teleport is available, the 5,000 gp for raise dead is a paltry sum that shouldn’t take up time.
Waiting around for a week to cast restoration again.
Dealing with the repercussions of raise dead prior to that week being up and restoration being an option.
Getting back to what they were doing.
So just ditch them:
The party gets to the temple no problem, just hand-waved. It doesn’t matter if they got lost and had to find their way again.
Say the team raised the money for raise dead during the downtime. Originally I had suggested just docking the party the 5,000 gp—it’s a fairly trivial amount to a party of this level—but Austin Hemmelgarn suggested this great idea to just let the solution for 3 also stand in as a solution to 2. Now there’s no reason for anyone to complain.
Just time-skip the time. Raising money for raise dead gives a good enough answer to “what were we doing?”
Assume restoration got cast after the week.
Just hand-wave this too—either their teleport worked, or it didn’t and they found their way back by other means.
Now this process has taken exactly as much real time as someone getting cured after being knocked unconscious.
Reintroduce complications that are actually meaningful
We assumed that the whole process is pointless and absolutely nothing in it was worth devoting time to. This is often going to be a fair assumption. When adventurers are off exploring, when villains’ plans are long-term and not subject to any immediate deadline, and so on, the time taken won’t matter. The money and the spells will basically never matter. And the area around the temple is very likely to be not particularly dangerous people who are high enough level to cast teleport.
So our baseline is to remove all of those. But what if the assumption isn’t totally fair? Then we add back in just enough to cover things where the assumption gets wonky.
There are basically 2 things that could be problems:
Missing on one or the other of the teleports is a problem.
Time is actually a critical limitation.
Missing on the initial teleport back to the temple is likewise almost impossible to make into a problem: they are presumably very familiar with the target destination, and anything similar to their target would presumably work about as well (and if nothing else, is at least a safe place to land and get their bearings from). Under those conditions, they have only a 2% chance of even having to worry about what else is in the target area. And then the problem zone would have to either be very large, or very close to the temple, for there to be even a remote chance of actually hitting it. So unless the temple is right next door to something the adventurers don’t want to teleport into, it’s not even worth rolling. If that is the case, call it a 1% chance and just roll a d% for it.
The second teleport gets a little more interesting, because they aren’t likely to be “very familiar” with wherever someone got killed, and in any event, the environs there are clearly dangerous. So this can be rolled normally if desired—94% of the time, it’s the same as our assumption that nothing goes wrong, but it’s also just one d% roll to find out if this is going to be one of the 6% where something does.
But in my short version, I just hand-waved all of that as a 5% chance of something delaying the party for a week. Seemed good enough to me.
If time is a critical factor, I wouldn’t assume this behavior at all—at that point, the spell to cast is resurrection, followed immediately by restoration, and the entire procedure should take under an hour unless the party runs out of teleports, at which point it takes a day or so. Spending a bit more real time to minimize the game time that passes is legitimate, because this is now a challenge.