is there a plugin or script to import products, accounts, categories from Magento to Craft Commerce? Or is this something to be written from scratch with FeedMe?
I don't think there's a plugin that does this. However, I would like to point you to a talk by James Greig that happened last Friday, in which he explains a number of possible ways to migrate content from X to Craft. He too uses FeedMe to do the import part, but has a few approaches to exporting the content on the other side: