your sample C# app is a pretty simple implementation, just a regex to handle a common obfuscation of string values.
This javascript version details some of the issues not handled:
https://github.com/ben-sb/javascript-deobfuscator
a real deobfuscator like the sample javascript one is more complex.: when writing a deobfuscator, typically you:
parse the obfuscated javascript into an abstract syntax tree (AST).
once the AST is built you can perform transformations on the AST to deobfuscate known obfuscation patterns
write the transformed AST back to javascript source.
the javascript world has a standardized AST format used by javascript language parsers. this allow a large library AST transformations.
https://github.com/estree/estree
there is a C# port of this code, which is used the asp.net web optimization tools:
https://github.com/sebastienros/esprima-dotnet
note: if you are not familiar with AST's, they are common in language parsing. in C#, lambada expression trees (used by MVC binding, EF and Line to Sql libraries, etc) are a form of an AST. But for .net language parsing the roselyn AST is typically used.
https://learn.microsoft.com/en-us/dotnet/csharp/roslyn-sdk/get-started/syntax-analysis