Description
Your use case
What would you like to do?
An official plugin/modification API similar to BetterDiscord which would allow expanding the functionality of Element in a much more dynamic way than committing directly to the project.
Why would you like to do it?
Electron was built specifically to be easily modifiable by the user, ever since it was Atom Shell, and eventually renamed to Electron. Many other projects, rather officially or not, make good use of this, such as previously mentioned BetterDiscord. Many features that some people may want are rather too niche or not worth the Element developers' time to justify adding to the main Element client, such as automatic message translation, advanced GUIs for search and room management, or a reimplementation of Discord's emoji system (all notable BD plugins). An upside that may be more important to the Element developers is that if this catches on, it'd be an easy way to gauge what features people do want added to the main project via plugin popularity.
How would you like to achieve it?
Possibly the same way BetterDiscord does it, an injector with plugin script files. If BD is anything to go by, if you give people a way to modify a client, they will modify a client.
Have you considered any alternatives?
There are really only three alternatives to this, and all of them are less than ideal.
Unofficial Injector
The best of these would be to make an unofficial plugin injector, and while that is perfectly functional, especially since as an open source project I imagine the developers would be more likely to play ball with the maintainers of an unofficial injector to ensure stability, this would guarantee some loss of stability and security. This specific example is not a bad alternative, but it's certainly not the best one.
Contributing directly to the Element project
This comes with many more issues, including but not limited to being more difficult to create (as it would obviously come with more stringent security and stability criteria than a user modification), being less likely to be approved at all (too niche for the main project/out of scope), or simply because it'd make the project bigger than it has to be. Not ideal for users, developers, or the Element project maintainers.
Forking Element
The worst option of them all, as it'd mean minor changes would be forced to be maintained on an entirely separate fork of Element, with no upstream improvements likely to come, and being even more difficult for a would-be plugin developer or plugin user than the other two. It's very rare that someone who wants to modify a client would prefer to have to maintain their own version of said client.
Additional context
This issue is related to #15650, which was previously closed as the specific examples the OP submitted could be done using an alternative (a local service). I'd like to make clear that the specific examples I've listed are not the only reason I'd like such a thing to exist, and if you require more examples there's an official list of BetterDiscord plugins that contain popularity statistics to further my case here.