Mexican cavern dives are extremely popular. I did them as a relatively new diver more than 20 years ago, and I had a very good time. If you have a good, safe tour guide, you can have an excellent experience that will tell you whether you are a candidate for future cave diving or not. (Excited? You are a candidate. Didn't like it? You aren't.) Thousands of recreational divers do these dives each year, and incidents are very rare.If you find someone who will take you cave diving, especially if you're claustrophobic, you should write your will in advance.
But they happen.
In every case I know of (and I know of several), the dive guide inexplicably took the divers out of the cavern zone and into the cave. Every single case. I don't know of a single cavern diving incident that happened on a dive that stayed in the cavern zone.
I have dived the cavern zones on my way into the caves of both Tajmaha and Ponderosa. With a proper guide, both are very safe dives. I suggest you make sure you are diving with a well established operation. They are likely to follow the rules (and there are sules) for safe cavern diving.