How to alter the output of a file-field as a custom field-widget
The file field for uploading is defined in the render callback of ManagedFile:

public static function processManagedFile(&amp;$element, FormStateInterface $form_state, &amp;$complete_form) {
  ...    

  // The file upload field itself.
  $element['upload'] = [
    '#name' =&gt; 'files[' . $parents_prefix . ']',
    '#type' =&gt; 'file',
    '#title' =&gt; t('Choose a file'),
    '#title_display' =&gt; 'invisible',
    '#size' =&gt; $element['#size'],
    '#multiple' =&gt; $element['#multiple'],
    '#theme_wrappers' =&gt; [],
    '#weight' =&gt; -10,
    '#error_no_message' =&gt; TRUE,
  ];


So one way to change the output of the field is to define a custom form element which extends File. The element can be themed as wanted.

And in the process callback of the custom widget the type of the upload element can be overwritten to use the newly defined element:

public static function process($element, FormStateInterface $form_state, $form) {
  $element = parent::process($element, $form_state, $form);
  $element['upload']['#type'] = 'myCustomFileElement';
  return $element;
}