I see the carpet matches the drapes. (Sorry! That's the first thing that came to my mind when I saw your picture.)

I don't think the extra damping is at all necessary. Your wall isn't going to vibrate much if your studs use standard spacing. That being said, I don't think what you're planning would harm the sound at all. If you're set on doing it, why not put a couple lengths of 2x4 horizontally between the studs above and below the speaker bucket. That would give you more localized strength/stiffness than the MDF. Also, instead of the semi-permanent expanding foam, I'd use mineral wool or polyfill in the cavity.