“Just as safe”? There are far too many factors involved to give a definitive answer either way.
What type or class of surface ship?
What type or class of submarine?
What type of power; conventional or nuclear?
Which navy (as in which country)?
Which seas? What type of weather? What hazards are present?
What missions or exercises or operations?
Sea duty, dry dock, etc.?
Full crew, short-handed?
Level of training and readiness?
Expertise of leadership?
Peacetime or wartime?
If wartime, which opposing force? What are the strengths and weaknesses of the enemy?
The list is potentially endless.
~
Having served in the Royal Canadian Navy yourself, you have first-hand experience and knowledge in the survivability of surface ships. Having served aboard US Navy ships as a US Marine, my experience and knowledge base, while more than the average landlubber who has never been aboard a naval vessel, I may be less qualified than you are to venture a guess. I had a neighbor who retired from the Submarine Service, he once remarked that he would not live aboard a surface vessel for any extended period of time for a million dollars, citing his viewpoint that far fewer submarines have suffered deadly mishaps throughout history than surface ships have. I found that a bit illogical, because surface ships have existed for centuries, and perhaps at least a million of them have been built, while submarines number in the thousands. Conversely, many sailors who have only served on surface ships, or primarily served on surface ships, claim that neither love nor money would get them into a submerged submarine. The thought of being underwater for the average modern-day cruise of months at a time, coupled with the probability of death at any type of underway accident, both combine as a no-way-out proposal for them.
Avoiding detection is one of thousands of aspects that can or cannot go wrong. A weak of a nuclear reactor, an iceberg, mechanical errors, human errors, weather-related problems, damaged hull, onboard fire or explosion, sabotage, any number of other unforeseen incidents could plague a sub. Those same might also befall a ship.
I understand you’re seeking a simple and straightforward opinion of an average person. I think much too analytically and with a reservation against erring to be the right person for this answer.
~
I’m not saying you referred to this, I’m bringing it up as another angle. During World War II alone, what were the ratios of a] surface ships in existence worldwide to submarines in existence worldwide, and b] surface ships that were badly damaged or sunk worldwide to submarines that were badly damaged or sunk worldwide? Then, take the percentage of survivors of badly damaged or sunken surface ships worldwide and the percentage of survivors of badly damaged or sunken submarines worldwide. I bet more deaths occurred by percentage in submarine-based incidents than in surface ships.
Of course, like you stated, if only your career and the subsequent years since are looked at, true. I submit that your years in the Navy were long after World War II, and you were not faced with the exact hazards that sailors faced then. The comparison of your relatively safer experiences leads to the validity your answer above, which is relative to the time period in which you served and circumstances you were under.
~
Yes, the two ratios of ships to subs are one factor and the percentages of overall deaths in ships and in subs are a separate factor.
~