Customizing Label Export

This is the code to create a label at the current selection, using the selected track name as the label text:

(let ((start (get '*selection* 'start))
      (end (get '*selection* 'end))
      (trackname (get '*track* 'name)))
  (list (list 0 (- end start) trackname)))

To turn this into a plug-in effect, you would just need to add plug-in headers (see: Missing features - Audacity Support)

No, because the file name is created when you export the labels, and that’s all coded into Audacity.