How to add a new custom user agent string?

I have a website that is tracked by Matomo, and that website can also be embedded in a custom desktop application. That application has a unique user agent string so it can be tracked if the user is accessing the website embedded or not. One method is adding a custom variable, but that would not be as good as having Matomo registering the custom user agent.
I have searched and found these two forum posts:
How do I add a custom user agent so it doesn’t show as “unknown”? - Support & Bugs - Matomo forums
Logo for custom Browser/user-agent - Plugins & Platform - Matomo forums
Which manually adds the user agent string. Though they havent written what exactly they did, specifically in regards to Browser.php, and there are no official guides or how to’s of any sort on how to do this. On top of that any modifications can be removed if Matomo is updated.
So then there is this the same issue raised in github where its suggested to write a custom plugin for this. Which is totally out of my league seeing as I am administrating a matomo installation who was asked to add this user agent string, and have no knowledge of extending Matomo at all.

So what to do? It would be nice for an easy way to a custom user agent string, but some more hints on how to add it to the device detector files would be great.

Hope this will at least get noticed because I can see other requests for this goes unnoticed. I would provide more links for the github issue mentioned above and more forum posts here without replies, but I am restricted to just two links currently.