You can create a pseudo effect by editing AE’s PresetEffects.xml file to define your effect panel. Then you can apply that effect by script, using the effect’s match name. The problem is, doing it that way, the system where you run your script has to have your modifications to the xml file, so that’s not a vary viable method if anyone else needs to run your script. You can get around that issue by including “Pseudo/” at the beginning of your match name, but then you have to apply it as a .ffx file, with the constraints you mentioned.
The other alternative is to create your control panel as a actual effect, using the AE SDK, but that has its own steep learning curve and installation issues.
Having done many of these for various scripts, I’d recommend the .ffx route as being the most manageable.