What's the most effective way to make this plugin system?

I want to make plugins communicate with each other and make it like a global system that anyone making a plugin could participate in. For example, I have a Spcial Plugin Communicator (SPC) it’s a plugin that doesn’t really do much but it has tones of optimized functions and systems within in that can be utilized by other plugins that connect to it.

The way I currently have it achieved is by making the regular plugin have a text inside a global variable, another way is by making a temporary folder that goes in the server storage and the spc plugin can look in each one and get the information needed.

For example I have a small rigging plugin, and instead of constantly updating it’s code to be more optimized (since I make more plugins and don’t want to keep updating them all.) It would basically request spc plugin to do anything for it. It works well, but what I’m trying to find out is if there is any other way to make plugins communicate more efficiently than global variables and server storage?

The main issue is that it’s possible for other plugins to find and overwrite those connections or even change the data. Basically, it’s to prevent malicious coding before it happens.

Basically, I am asking for a way for two plugins to communicate without anything else interfering.

The main purpose for special plugins is for neural networks and other advanced functions that keep updating.

I do get the problems that could go with this type of system, like what if the spc plugin ceased to exist, but I have different solutions for that topic.

Plugin —> (requests) SPC —> does the function/calculations necessary —> plugin —> plugin does what it needs.