Hmmm... I think if you just look at the overall numbers in one whack (i.e. all the u-boat losses for the whole war, versus the amount of shipping sunk in the whole war), that really doesn't give a clear picture of the situation. Much better to look at discrete periods of time, and the effects thereof. In other words, yes, the U-boats in the last year or 18 months of the war were being sunk so fast, even the octopuses were being choked by the diet of drowned U-boat sailors, but that was not the case in the early or middle portion of the war, not by any means!
Looking at WW1, 47% of the U-boat arm was in fact sunk by the end of the war, and they sank over 11 million tons of shipping. However, when you look at the figures more closely, it turns out that the UK ALONE lost over 2,000 merchant ships, and 14,000 merchant sailors, and during the month of April 1917 alone, one ship in four bound for the UK was sunk by U-boats, and the food reserves for the nation were down to only six weeks!!!
Looking at WW2, when war broke out in September 1939 against Britain, Germany only had 56 U-boats in commission (of all types), and by the end of March, 1940, had sunk 199 merchant ships and lost 18 U-boats in exchange, plus a carrier (HMS Courageous), and a battleship (HMS Royal Oak), and this was during the so-called 'restricted' submarine warfare stage! In 1941 alone, the UK had lost over 2 million tons of shipping, representing 432 ships, (and another 800 ships were sunk by German planes, mines and surface raiders). And in 1942, over 6 million tons of shipping was sunk by U-boats alone, accounting for some 1,600 ships! And this, with a U-boat force that still only consisted of 91 boats at the beginning of 1942, and although by years end, 87 U-boats were lost, new construction meant over 200 U-boats in operation by the end of the year. That's pretty good odds in exchange, if you ask me! And while the U-boats subsequently got a real pounding by the technology of the allies, the incredible technological advances made by the Type XXI's could have thrown the whole thing back again, if these had been put into production a year earlier....
In the Pacific, the numbers are even more staggering. At the beginning of the war in December 1941, Japan had some 2,337 registered merchant ships, but only 231 at the end of the war in 1945, versus a loss of only 60 US submarines lost, and of course that is not counting the MANY IJN warships lost to US attack submarines. As Japan was required to import 20% of its food, 24% of its coal, 88% of iron ore, and 90% of its oil, those kind of shipping losses represent a real stranglehold that cannot be ignored....
How does that impact the use and effectiveness of attack submarines today? That is an interesting question that might be a good subject for debate. The current submarines are so stealthy, and so fast, I wonder if they might not be able to achieve similar results to the submarines of the past. However, so far we have all been lucky enough not to find out!