Flattening an animated character

Hello, I’m wondering if anyone here might point me in the right direction in finding a solution to a rigging issue. I have rigged a character (using Rigify), and it animates fine. Now, I would like to be able to animate the character flattening over time i.e. in the X axis, on top of the existing animation (e.g. a walk cycle). When I try simply scaling the character along the X axis, of course it completely mangles the existing animation/deformation. Any thoughts? I’m happy to switch to a completely custom rig if Rigify is the limiting factor.