RE: unable to create an instance of automation server
According to my understanding of your scenario.
You are using your custom solution and call that solution in dynamics nav by using automation object type but from Dynamics NAV 2013 and above, it's commended that use dotnet variables instead of automation.
You are getting that error because your solution is not registered properly so I'll recommend you use these commands and you solution will work for dynamics NAV 2018
c:\Windows\Microsoft.NET\Framework\v4.0.30319\RegAsm.exe C:\Customdll\custom.dll /tlb:custom.tlb /codebase
c:\Windows\Microsoft.NET\Framework64\v4.0.30319\RegAsm.exe C:\Customdll\custom.dll /tlb:custom.tlb /codebase