How can I theme a form element with hook_preprocess_form_element()?
As @4k4 said, if all you want is to add some classes, then use hook_form_alter() or hook_form_FORM_ID_alter(). $form['your_element']['#attributes']['class'][] = 'your-class is all you need.

I'm pretty sure that single form elements don't have the form ID stored somewhere.