This kind of encapsulation, filling the empty spaces in the device with a thermoset resin, is called "potting", and it's been used for decades to improve the shock, vibration, and impact resistance of electronic circuits. It's true that the actual deceleration experienced by the components is much greater, and potting is not without its problems (a friend of mine told me about a problem he tracked down at his company in the 1970s, where potting in too-hard epoxy caused many of their circuits to fail in the field due to a sort of thermal shock), but it does generally work.
The issue is that acceleration in itself doesn't damage chips, capacitors, resistors, etc. What happens is that the things that hold those components in place — their leads — experience large forces from trying to hold those components in their relative position. Those forces are generally greatly reduced by potting.
There are probably exceptions. It wouldn't be surprising if MEMS gyroscopes and accelerometers were more subject to damage after potting.
The issue is that acceleration in itself doesn't damage chips, capacitors, resistors, etc. What happens is that the things that hold those components in place — their leads — experience large forces from trying to hold those components in their relative position. Those forces are generally greatly reduced by potting.
There are probably exceptions. It wouldn't be surprising if MEMS gyroscopes and accelerometers were more subject to damage after potting.