Did Square even have a prototype to work with even?Yup. Plus, the scrapped parts of SD2 most likely only ever existed as draft documents and paper sheets, not actual programmed stuff. There was never a finished CD game that was complete and that Square deleted content and data from in order to fit into a cartridge. The CD game was canceled way before they had any significant programming done.
I know Nasir is a real life wizard but I don't think even he could have repurposed specific prototype code to the SNES like that.
From what we know space was the major contention for Square at the time and why they were fed up of working on carts.
I can see them deciding that the scope of the project was far too big to fit a regular SNES cart and going from there.