Dimp, I can't imagine that your plywood and foam solution is much good for correctly supporting the gun while driving the pins.
The function of a bench block of any sort is to act as a inertial head to reflect the impulse energy back into the body of the work piece. The gun's action in this case. To do so you want it to be a good reflector of the energy and not soak any of it away. The plywood and foam will soak most of it away instead of reflecting it back.
For example, drive a nail into the middle of a long 2x4. A wall stud for example. It'll flex out of the way and make it hard to drive the nail. Now put a second hammer behind the 2x4 and hit the nail. The 2x4 stays in place, the nail moves into the wood further and the supporting hammer's head bounces away and back.
A good bench block does the same thing instead of allowing the energy to just pass into the bench.
Of course we don't want to use a hammer or steel of any sort for a gunsmithing bench block except in special cases. And that's where a high density plastic can work out well. Something like the hockey pucks mentioned are very elastic in that they act like a very good spring to reflect the energy back into the gun's frame or receiver. Likely they are made from UHMW polyethylene.
A hockey puck is still pretty small and light though. So to make it a good bench block it would still need to be used on a sturdy bench. And even better is if the block can be set down over one of the legs. It's surprising how springy even a "sturdy" bench truly is. Which is why bench vises should always be located as close as possible to being over one of the legs. And secondary legs are not a bad thing either. It makes the leg and floor become part of the rigidity of the bench block. Sort of like backing up the backing hammer with a SECOND hammer in the flexy 2x4 and nail example.
So what else makes a good gunsmithing bench block? That's hard to say really. But a couple of 6 inch long sections of 2x4 or 2x6 hard maple or oak glued together and use the end grain faces would come close. While you're at it make up a couple or three and use the others as supports for the barrel. The ends could be cut with a shallow V to support round shapes with more stability. I wouldn't drill the holes right through. Instead just make them blind and a couple of inches deep. After punching the pins out just tip the block and dump the pins out.