When I played SWAT4, I remember being glad the game put me back at the beginning of the level every time I lost, just because it kept me from doing this.
In games like SWAT4, the core game mechanism is planing your moves upfront and not the action part. If you fail, your whole plan failed and let the player continue at this point would ruin the whole core game mechanism. You can think about it like 'Create a plan and test it out, while the test will include some random outcomes, you can't plan upfront' game.
Racing games sometimes use a mechanic known as "rubber banding", whereas cars behind you get faster while those ahead of you keep a slower pace to allow you to always catch up with the lead while keeping up the pressure from your pursuers. The biggest challenge with this approach is not to make this too obvious to the player since it can easily break immersion if cars behind you suddenly drive alot faster.
This approach of adaptive difficulty level has been implemented in valves L4D (AI director). The hard part of this approach is to measure the level of challenge of the player. I got really cool experiences in MMORPGs where my team got almost, just only almost, wiped and those experiences were the most satisfying ones.
In other words, you need to push the player off the cliff just enough, so that he can hang there for a moment before you drag him back on safe ground.
the "Carrot vs. the Stick" principle.
Too often game designers start with the stick, trying to punish the player all the time, even trying to enforce the player to play the game in a certain way. But you just need to remember, that the player will not like punishment or any restriction at all, he want to have a cool, still challenging, experience.
The big problem with challenges is, that it depends a lot on the indiviual. There are people who dislike challenges at all (they what to play/read an interactive story) and people who really seek hard challenges (people who like roguelikes). In my opinion, the acceptance of a hard challenge depends a lot on its duration and accessibility. Once you fail, you want immediatly to start over. If you need to spend a lot of time to retry the challenge, or the challenge was too time consuming, that a restart just let you feel sick, then the player will most likely abort it and leave.
An other observation is, that a hard challenge don't necessarily need an high reward, because beating this challenge is quite satisfying on its own, though a missing reward could kill the experience. Therefor some special reward would really help.