CAT D means the insurance company doesn't want it repaired at the price a main dealer wants for the labour, because the dealer doesn't want the job.
There are many CAD D cars bought from insurance companies by Main Dealer Mechanics who, in their own time, repair it. CAT D is nothing to do with the safety of a car, it is, in my view, a device used by dealers and insurers to sell more new cars.