I've never used ex mode, so I could be wrong about this, but briefly reading through the description for it made it seem like you could replicate the functionality through the neovim plugin/messaging architecture, and probably get something cleaner on the other side.
Also it's good to make this kind of feature as plugin, so it will reduce the code complexity.