I have written a 66-line Ruby script that can be used in Automator as a Service/Quick Action via a Run Shell Script. Because this site blocks my posting the script here in both the <>, and Note accordian, I have to again place the Ruby Script, and PDF documentation on how to configure it — on my Google Drive location.
Essentially it will automatically handle a mixture of Microsoft Universal Connector (UNC), SMB, and WebDAV paths, using percent encoding as necessary for UNIX network paths. As used in an Automator Service/Quick Action, it will replace the selected path text in any application with the alternative network path. Here is a quick example summary where the source path precedes the converted path:

I have taken extra pains with the documentation, so you should manage to get it working. This would have required hundreds of lines of AppleScript for the same capability.