That should work.
With EVA Foam you need to seal the foam and close or block the pores in the foam, otherwise the foam will just soak up and absorb the paint. That is why the first paint you posted won't work on its own. Once the foam is sealed, then you could use that primer.
You can also look into sealing the foam by using a heat gun.