This sounds like a niche for a small Pacific island. Islands like Jersey and the Cook Islands tailor their legal systems to cater for those who want a looser financial system. A small state could tailor their laws for those who want to repair things and potentially make a very nice "high tech" economy out of reverse engineering, importing broken stuff and exporting fixed stuff. Copyright holders might try and block a…
I feel like openly running an illegal business out of your embassy is a quick way to get your diplomats expelled.
If the host country doesn’t like what they suspect is happening inside an embassy, they can go through diplomatic channels to request it be terminated (perhaps with a threat of some kind, like expulsion of the diplomat).