ESD from human affects electronics. Why it does not affect the pacemaker? Is it beacuse it is much below the surface?
ESD problems are caused by buildup of static electricity on the surface of a human or other device. The damage is mainly caused by the sudden equalisation of potential. Like a very small lightning strike. Another is noise from other devices.
You may have experienced electric shock when touching a door handle or a friend. This is on the higher end of the for very small smd components can take. They may be damaged even by shocks humans can not feel. However its not like they will always get destroyed by such shocks, its more of a statistical thing for manufacturing while the component is still separated from the board.
Now the important bit is that this causes damage because it is localized, the shock traveled directly to the component before it starts to spread around. The pacemaker is inside a human so it has a lot of insulating and dissipating medium around it.
Also the pacemaker is also shielded by its casing. It is after all a device that sends shocks. Your remote control or computer is not very likely to break from a shock as the case shields the components from being in the direct line for the shock to ground. Similarily the case may protect from other esd sources.
But yes the pacemaker can fry if you have a big enough shock. But then the human would be dead regardless.