I’m not sure about question number 2 (legal is outside of my arena) but to answer this one, it’s just the plugins you choose to use that could represent a potential threat.
If you really want to use a plugin, there’s ways of reducing the risk. The good thing about plugins is that they’re open source, so anyone can review what they’re doing. If possible, you may want to enlist someone you trust with knowledge of TypeScript (or JavaScript) to check out any you’re interested in. Some plugins are fairly simple, so this shouldn’t be too hard in those cases.
If I were to scrutinize a plugin, I’d be looking for anything on Licat’s list and anything that seems to be unrelated to the direct functions of the plugin.
I’m the dev of the keyboard nav plugin you mention, and it’s a good example. The actual code is only 63 lines. Anyone with knowledge of the aforementioned languages should be able to quickly tell that it isn’t doing anything remotely nefarious.
Still, this isn’t 100%. The only real way to be completely and totally secure with highly sensitive information is to stick to the methods you’re using already: locally encrypt your data and don’t expose it to uncertainties.
But, hey, at least I can vouch for the macOS alt keys plugin!