Some experience from mine line of work with those materials:
Expanded foam will dampen the sound a little bit or can even make it worse(due to contact noise).
If you would like to dampen the sound i would suggest rock wool.
Fill the empty spaces with it and the acoustic sound is gone, also the trembling of the sound is completely adsorbed.
This is not the case with any expanded foam (pu, pir, expanded ect).
Trains on your construction will make contact noise and will make air noise, both noises like all noises are trembling/resonating/vibration.
With expanded foam will only counter and not absorb contact noise.
Rock wool will counter both(air and contact), fibreglass wool is a bit cheaper and won't dampen so much as rock wool.
12mm mdf is pretty solid and will help reducing the noise.
What a lot people are placing cork sheets under there tracks, but personally i have no experience with that.
Expanded foam is perfect for modelling landscapes and hills, the foam is very easy to cut
View attachment 1286View attachment 1287
View attachment 1288
Blue is your 12mm mdf
Red is your 4mm ply
Green is the insulation material
Yellow could be the foam or broken pir sheets.
Grey i have no clue
The 2x1 soft wood and all the 4mm ply ribs are pretty ambitious, i suspect you are going to place fine mash or chicken screen on top of it?
And or cover it with old news papers soaked in wall paper glue, paint afterwards mixed with sawdust?
I am looking forward to see some building and end result photo's.
With best regards Igor