RE: How to map an ID from a 3rd party app to a Contact ID
Yes. if you already have a JavaScript app interacting with d365 it already has the framework in place that you can extend. just need to create the entity and invoke using the rest api.
Some apps call direct, others wrap inside a c# rest api. either way you end up using the d365 rest call that may look a little like api/data/v9.1/new_contact_channel_user.
You can use an app like this to help generate the api code with more precision: www.xrmtoolbox.com/.../
most managed solutions may have a way to offer extension you can maintain following a certain procedure, but some third party devs manage to create some stuff that will get deeply engrained in d365 and wrack it up during upgrades.
If it is doable , the provider usually will tell and provide guidance on how to upgrade without loose customization
One last thing, without a relationship, someone could accidentally start inserting guid values in the contactid field of the entity Contact_Channel_User that are not really real contact id. Just need to make sure there is some security around and good testing. (i've seen things like that happening and messing up reports)