Is there a better way than twig files overwrite?
Yes, usually there is a better way: preprocess functions allow you to alter the render array that is passed to the twig template. Adding a class is, in most cases, possible, but you might need to check how the twig file is turning the render array into markup.

This article has more info: https://www.drupal.org/docs/8/theming-drupal-8/modifying-attributes-in-a-theme-file