Disclaimer - my experience is with Rhino for Windows so some of my suggestions may not be valid for Rhino for Mac.
Your rail is a closed polysurface with 2000 surfaces My guess is your imported or created a mesh, and then used MeshToNurb to create a polysurface from the mesh. That is usually not a good way to obtain a polysurface for future work.
A shape like this won’t “flatten” without distortion due to the compound curvature.
The end caps will probably cause problems with any attempts to flatten, etc.
Several ways to proceed.
a) Go back to the mesh, remove the end caps and try Squish. No idea what you might get.
b) Rebuild as much simpler surface or polysurface. You should be able to get a good surface using Sweep1 or Sweep2 with a few cross sections and one or two rail curves. Then try using Squish or Smash on that surface. Depending on how the part will be made you may need to split the surface into a top and bottom or a front and back.