So I know that it is possible to steal code from a plugin. Which is why I am wondering if it is possible to have a loader inside the plugin connect to the MainModule which manages the plugin. Yes I am also aware it is possible to steal a Module but the Wiki does say how to defend from that.
Yes.
But not how you want.
The truth is simple. If it's on a Plugin, it's on the person's computer. If it's on their computer, they can steal your code if they're determined enough - No matter how much effort you put into making sure that they can't.
If you don't want people to steal your plugin, make it open-source. Nobody steals open-source code.