How about sending in the ship
and the shuttles. After all, you can use all the transporters you can get. Have all but one of the shuttles transport survivers, keeping as far out of the way as poss so they (
they mostly meaning the enemy in this passage) are less likely to notice. Have the ship and shuttles give off a false warp sig, except that one shuttle (or maybe that shuttle should too). The one shuttle can act as a distraction, going in first and moving fast. it would probably be best to not shoot much, only what is necessary to get them mad at it, and keep them occupied. Your ship can tow the KM out of the way to buy a little time(or maybe keep it there so they are less likely to notice). If there are any communications with the KM, have them send as many as poss. to your ship with their shuttles (if any are still there and working), and have them dock, then send the shuttles back for more people. you'll probably lose the decoy shuttle. That shuttle pilot should be prepared to transport into space at the last minute in a spacesuit, and get picked up by another shuttle when the mission has been aborted. when the mission is aborted, then destroy the KM. If comm is working, have the remaining survivors get to the escape pods first, then get out of there as fast as you can while having the ship and shuttles towing the escape pods and transporting people aboard as fast as poss. have your ship pick up and bring in as many escape pods as you can before leaving, then tow the rest. If there are escape pods left and the decoy shuttle is still intact, have it transport as many as poss, and drag whatever it can handle until your ship can get them aboard too. You will probably still lose people, but at least you saved a lot.
Feel free to add to or subtract from my idea to make it better, or just say it's stupid and won't work. But I would prefer if you explained why, especially if it's because of a Trek tech thing I didn't understand.