I think you need to go step by step, that's all... as Jaffa1949 said, there are reefs and reefs.
I've been close to a bad accident in a french shorebreak, I hit my head really bad and felt a "crack" in my neck. Lucky I got nothing bad except a big dizziness but basically the same wipe out on a reef would have sent me straight to hospital for sure... It's only sand, but sometimes it can hurt you really bad.
I surf mostly reefs now and never got anything like that. I just choose carefully where and when I surf. Many reefbreaks aren't that shallow, and if you know how to surf (hence how to fall) you will maybe not even touch the bottom once.
Other are quite the opposite, you will hit it almost everytime.
What I do before heading to a shallow reef (when I already know it's shallow) is assessing the following:
Is there a take off zone where the waves are not so steep ? If it's a kind of wave where you have to take off straight into a barrel, that's not for me (yet). I know my chances of falling on the take off are high on these kind of waves, and wiping out on the take off of a shallow wave is not really a good idea...
If the take of zone is a bit more mellow before heading to a steeper/hollower section, usually I prefer. First I will have time to set up, second if I fall I will most likely expect it and anticipate it. It doesn't mean I won't connect with the reef, but normally I won't go over the fall with the lip, which is clearly the worst.
If you are more intermediate, check also for the shoulder. If there is no shoulder (a barrel and then nothing) you better stay away from it for now. But if there is a mellow shoulder, or at least a shoulder that will leave you in a deep channel, you can go step by step by starting to take off close to the channel and getting deeper and deeper as long as you are making progresses and you gain confidence.
Last point, check the end section, and be careful with it. Some of them are extremely shallow, so don't go for a top turn, a floater or a wipe out if you are not sure there is enough water beneath you !
If you are doing it step by step, there is no reason for you to get badly injured, except from a few reef cuts on your feet and dings on your board at the entrance/exit. My board actually get many more dings than me, but I prefer it that way than the opposite !
I just take precautions. I don't surf where it's too big and shallow and above my level, I exit waves before ending up on razors... and I surf spots that aren't that crowded/with too many rippers in. So I don't play the "I'm deeper" game too much.
Use your own judgement regarding your level, if you are pushing yourself a little bit that's probably ok. But if you are scared as hell you will probably panick and make wrong decisions that can lead you where you don't want to be ! So be wise and take your time, no rush !