Now this is great question and one which proved hard to find out. Usually you can find out injury rates per 1000 hr of practice but there wasn't a direct comparison between squats and deadlifts so I can only answer this question with my opinion and experience.
Interestingly the piece of kit most responsible for hospital visits was the Treadmill yep the Treadmill. Running is bad for you!!! I'm kidding I'd say the reason for this is that the treadmill is probably to most used piece of kit in the gym especially with beginners apart from maybe the cross trainer but it's pretty hard to fall off a cross trainer.
Anyway back to the main question Squats or deadlifts which one is more likely to give to a one way ticket to snap city?
Let's face it most gym bro's dodge the coat rack sorry I mean squat rack like the plague. So I would say the deadlift is a far more popular exercise in terms of general gym use its also one of the lifts I see in which people use horrendous technique. So for those two reason I'm going to say that the Deadlift is probably the culprit for more injuries than the squat. But I wouldn't say the deadlift is inherently dangerous in fact every single client I train deadlifts in some form or another because there isn't really anything more functional than being able to safely lift a heavy load from the floor. What causes problems is the weird movement that people do when they say they are "deadlifting" you know the one where the hips shoot up and the spine rounds over like you're trying to pull a shark out of the ocean using a basic fishing rod. This places un even stress on the intra-vertebral discs and in some cases causes them to herniate. And if it presses onto a nerve you'll know about it like a bolt of lightning of pain.
A herniated disc isn't the end of the world and you can bounce back but it certainly isn't pleasant and will put a dent in your progress. If this happens you must seek advice from a physio and they will help to relieve the pain and strengthen the area.
In order to safely hit the lifts you must be flexible enough to ensure you can hit the correct positions. I have written about the flexibility and mobility needs of lifters before https://www.devanneystrength.com/articles/law-1-flexibility-mobility check this out afterwards.
If you can easily reach all the positions then making sure that the muscles of the trunk i.e the anterior core and muscle of the spine are strong enough to support the load through out the movement is paramount to being able to safely perform the lifts. Using more basic movements like planks, side planks and back raises to strengthen these areas prior to learning the lifts is a good way to ensure they can tolerate the loading.
Get a professional to teach you how to execute how lifts this way you'll now how to perform them as safely as possible and avoid injuries while getting extremely strong.
No exercise is inherently unsafe what causes injuries is your inability to tolerate the load in the positions.