It is very, very rare.
I can think of only one really sketchy situation and it happened in 1988.
I’ve done several diversions for medical issues which is life threatening but it was mostly procedural and nothing particularly challenging.
Some may argue that every flight is life threatening but I think you’re asking about emergencies that take crew intervention to solve. There are “non-normal” situations that happen when something on the airplane breaks and we need to run a checklist and use some alternative procedure but it’s never risen to the level of life threatening in my mind.
Modern airliners are so robust and have so much great engineering and backup systems that mechanical problems that lead to serious issues are almost nonexistent.
More likely, is crew error and those situations are rare because starting in the 1980’s, copilots became co-captains and now are required to warn captains when they perceive a problem developing or believe the captain may be making poor decisions. They will take the airplane and return it to a safe condition now. In the past, captains were considered the final authority and fully responsible. Now, a copilot will have her certificate suspended along with the captain. Because of this and other fundamental changes in the cockpit, human error has been drastically reduced. It’s called CRM or Crew Resource Management and it has been the biggest reason for the huge improvement in airline safety in the last 40 years.