How to replace harness pad?

In my lengthy search for the 'ideal' pack for longer walks, I'm wanting to fix my old comfy Macpac harness.
The pic shows the mesh that used to house firm open cell foam, which has completely disintegrated:
I should be able to unpick the stitching, insert some new foam, and hand-stitch it back in place. I'm wondering if anybody has a suggestion about what to use. I don't really have any idea what is available, that might be better than just a piece of open cell foam.
Thanks for any ideas.
The pic shows the mesh that used to house firm open cell foam, which has completely disintegrated:
I should be able to unpick the stitching, insert some new foam, and hand-stitch it back in place. I'm wondering if anybody has a suggestion about what to use. I don't really have any idea what is available, that might be better than just a piece of open cell foam.
Thanks for any ideas.