My team develop an angular 5 application that has been in production for a while, but we\'ve been tasked recently with making the app work in other 3 sites the company owns.
I think the solution of your problem resides in Angular Elements. It is pretty cool and provided by angular team.
Angular Elements lets you package your Angular components as custom web elements, which are part of the web components set of web platform APIs. Web components are technologies to help create reusable, encapsulated elements. Right now, that includes the shadow DOM, HTML templates, HTML imports, and custom elements. The custom elements technology powers Angular Elements.
Here are some reference links from which you can learn more about Angular Elements.
https://angular.io/guide/elements
https://www.telerik.com/blogs/getting-started-with-angular-elements
Thanks!