Mozilla implemented a REST service based on (an earlier version of) bergamot-translator [1]. You could use that as a replacement for the WASM component in the addon's code.
I also know of some full-page translation demo code that uses the python bindings of bergamot-translator [2]. That's basically a web proxy a la Goole Translate.
Lastly, marian, the translation software that's being used, has a web server as well [3]. It does not support HTML though.
EDIT: see also my earlier comment for using it with Node or Python [4], which you could use to implement a simple web API.
[1] https://github.com/mozilla/translation-service
[2] https://github.com/jerinphilip/tagtransfer
You can have an example on how we did here [1] and test it here (I recommend using Firefox) [2]
That way you don't need a server and everything is processed in the browser, so no need of google translate, or any cloud service to have translations embedded in any website anymore.
[1] https://github.com/mozilla/translate [2] https://mozilla.github.io/translate