If you're going to do foam, definitely go with lining it with cloth and to keep the foam off the cameras.
My father gave me his rangefinder cameras, a Leica IIIg and IIf, that were packed in foam since the 70's. The IIf is okay but the foam broke down around the IIIg.
The rangefinder is hazy, in fact, the IIf is brighter, and the chrome is screwed up where the foam latched onto it. If there was something between the camera and the foam, I think it would have faired better.
Soon, I'll be looking to give the IIIg the CLA it needs. I remember it being a nice camera and I'm hoping a good technician can let it recapture some of its glory.
For myself, I'll not keep a camera sealed in foam. However, my father's Leica's were mostly sitters, not so much shooters. The IIIg might have had a chance if it and the case had a chance to breath once in awhile.