Glaser safety slugs have a nasty rep for NOT penetrating.. or having what we refer to as a "Surface Burst". They are nasty with the right shot placement, and ricochet is not a factor with them. However a large, overweight suspect, or heavy winter clothing.. more than likely they will not make it into a vital area..
I have witnessed real world examples of this. One was very fortunate, as the shoo-tee, was an obese security guard that caught one right between the nipples out of a 38spl... he had on a jacket, and was a BIG guy.. he went to the hospital, they chased a few pellets and a BIG bruise.. He was released the same day... His assailant went to jail for Attempted Capitol Murder.. (he was robbing a store at the time) A solid bullet, it would have been Capitol Murder..
Two basic schools of thought on handgun stopping power, one big heavy and slow.. and the other, light and fast... my personal preference is the from the light and fast school.. Both schools have their talking points, both work...
The downside to the heavy and slow is... they do tend to penetrate pretty heavily, the other is that they have a tendency to stay pretty much intact, therefore if ricochet is a concern, the factor is higher with larger slower bullets... They have a tendency to completely penetrate, and exit their target, along with any remaining energy...
Lighter faster bullets tend to not penetrate as heavy, and often times will stay within their intended victim.. this means that ALL of the energy was absorbed by the target..
You specifically mentioned the 40 S&W.. a good choice... Personally my favorite load for that caliber is in the 135 grain weights, I hand load, and I push it as fast as I can comfortably get them with out signs of overpressure.. about 1350fps.. Ricochet is virtually non-existent as they have a tendency to break up upon striking a hard surface, they open up like a beer can, and deliver an impressive amount of hydrostatic shock... The loads I have worked up group well off the Ransom Rest as well...