Laser ablation with ultrashort pulses allows to create precise and flexible geometries on various materials. However, the generation of complex surface geometries with low surface roughness, high contour accuracy and defined depth still represents a challenge on porous and inhomogeneous materials such as additively manufactured parts or carbon fiberreinforced plastics (CFRP). In the present work, optical coherence tomography (OCT) was utilized for high-resolution optical distance measurement. The measurement beam of the OCT-based measurement system and the processing laser beam were superimposed with a dichroitic mirror. Combining both beams allowed online, time-resolved recording of the ablated depth during laser processing. The comparison of actual ablation depth with the target ablation depth was used to select areas that had to be processed in the subsequent pass. This closed-loop control of the ablation process was used to generate complex 3D geometries in stainless steel. Furthermore, the closed-loop controlled ablation was utilized for postprocessing of additively manufactured aluminum parts in order to remove support structures and to significantly reduce the surface roughness. Moreover, the OCT-based measurements allowed to determine the orientation of the fibers during controlled laser ablation of CFRP for layer-accurate laser ablation, which served as preparation for repairing damaged CFRP parts.