You flag a not uncommon occurrence.
Over time, I have come to be very skeptical of stainless steel (especially "D" shackles) in many of the common uses that finds it used on a cruising sailboat.
Two reasons: they break without warning, sometimes in ways that can do damage to crew or boat. And unless you are quite diligent that you only purchase from a manufacturer who is well known for quality control (read also expensive), you do not know what you are getting and it may be junk.
My solution has been to replace some of the ss shackles and ss bales with lashings. Lashings have the advantage of being as strong as you want them to be and to give lots of warning of approaching failure. They are also of variable length.
I do my lashings in a particular way to ensure back-up and some UV protection.
First I determine the number of loops necessary to achieve the strength I want (add some for safety). Almost all my lashings are done with 3/16 inch/4.5mm yacht braid. Say 6 strands (3 round trips) equals the strength I want. I would bump that to 8 for a safety margin. I would then take 2 loops (4 strands) and secure the loops with a couple of 1/2 hitches. This would be my “back up”. Then (continuous line) I would take 3 more loops (6 strands) and secure it with 1/2 hitches. The lines will “work” enough so that in short order all of the strands will be under the same load.
If I believe the lashing will be shaken around a lot, I will seize the strands at either end.
Visually, they will give good warning of UV damage or chafe damage well before ever getting close to failure. I practice, I take them apart every couple of years, give them a wash, and turn them end for end. They have never failed me.
My best, Dick Stevenson, s/v Alchemy