This is quite an exaggerated point; the number of people imprisoned for making mechanical, civil, or electrical engineering errors is very close to zero in the US.
I think more programmers have actually been charged than any other field, although I can't quote a statistic to back that up.
Also the environment in which this happens is completely irrelevant.
By the way. A dentist gets to try on fake tooth before drilling a real tooth. They actually don't have a choice, that's part of the mandatory training. Doctors gets to train on real people too, medicine schools go to great length to procure bodies for training purpose.
In programming, one would be lucky to get any sort of test environment.
Are you saying you went straight to writing production code before you ever studied any software engineering? Sounds unusual for practitioners of an industry endowed with such a critical responsibility.
A dentist can easily kill someone through malpractice... There's no code review, there's no test environment, and there are always difficult (often time-sensitive) decisions to make and difficult people to deal with.
If all you know is estimating story points and merging pull requests to make your burn-down chart look pretty you probably shouldn't be so confident that your profession is more difficult or more superior than one that you have no understanding of.
Medical staff have the equivalent of code review and test environments. Non-routine operations have always multiple people in the room. They have bodies to practice on.
Do yourself a favour and drop the attitude. Medical and software industries both have some very difficult jobs.
This would be a reasonable comparison if 90% of software developers could reliably produce bug-free code. This would be a (maybe less) reasonable comparison if 75% of software developers could reliably produce bug-free code. This would be a middling comparison if 50% of software developers could reliably produce bug-free code. This is a completely unreasonable comparison given that there have been 0 software developers ever, in the history of software, who have been able to reliably produce bug-free code. So yes, software development is orders of magnitude more difficult than plumbing, dentistry or electrician(-ing?). If you think it isn't, please feel free to jump in and prove all of us wrong.