Use the projection() feature of OpenSCAD to effectively generate a plane cut. Position the cube structure in such a manner that the x/y plane intersects the desired shape to be exported. Rendering the code will then generate a 2D image. Previewing the code will generate a 1 mm thick 3D model which will "flatten" when rendered.
For the image below, I did not translate the cube, merely placed the cube generation within the projection feature.
projection(){
MengerSponge(side, order);
}
This rendering will export to SVG as desired. Different positioning of the cube (rotate, translate) will create different patterns.