A teenager who admitted starting a fire at a large disused factory said he felt "terrible" by his actions, a court has heard.