I guess that maybe some rare VST plugins might have implemented "open/close GUI editor via MIDI" but it's really the host program's business to open/close the GUI editors of the plugins.
It seems there really isn't anything available readily in the Reaper APIs to handle both the plugin window opening and closing. You might, again, be able to pull off something via Windows messaging but that might require some heroic hacking...
(I have no idea right now how you would do that...)