How programmatically create custom field type with some base fields?
What you want to do is create a field type with multiple properties. This is indeed more efficient than a field collection, because a property only needs one more column in the field table, while a field collection is a complete new entity in the database.

This is the documentation how to build a custom field type from scratch in a custom module:

https://www.drupal.org/docs/8/creating-custom-modules/create-a-custom-field-type

As you want to add a property to an existing field type use this tutorial

https://www.lullabot.com/articles/extending-a-field-type-in-drupal-8

and extend the class ImageItem for the new field type. You also need to extend ImageFormatter to display and ImageWidget to provide a form field for the new property.