Performance of skipper CCDs for the DAMIC-M dark matter search