Exercising my Google-Fu, I came up with
https://developer.apple.com/documentation/coreservices/launch_servicesmacOS Launch Services is an API that enables a running application to open other applications or their document files in a way similar to the Finder or the Dock. Using Launch Services, an application can perform such tasks as:
* Open (launch or activate) another application
* Open a document or a URL (uniform resource locator) in another application
* Identify the preferred application for opening a given document or URL
* Register information about the kinds of document files and URLs an application is capable of opening
* Obtain appropriate information for displaying a file or URL on the screen, such as its icon, display name, and kind string
* Maintain and update the contents of the Recent Items menu
Icons for file types are therefore handled by Launch Services and the icon for a file is provided by the application handling opening a file by default.
The way an application provides its metadata to the system is through the use of a special file called an information property list file, or Info.plist.
So, you need to add your file type definition to the plist file of the application that will open it by default.
That should get you going without any abracadabra ;-)