That is not quite the intent of an XPC process. You can definitely use an XPC process if you want, but an XPC alone isn't going to help you escape the sandbox. It is possible and explicitly allowed for Mac App Store apps to have plug-ins that can escape the sandbox. But I am unaware of any Apple framework that is explicitly designed to help you do that. Also, for the Mac App Store, you will have to design your app carefully so that it has an acceptable level of functionality without the plug in.
But if you can handle all that, then you can design your plug-in however you want. There are numerous ways to have the plug-in and your sandbox app work together. Personally, I wouldn't recommend scripting because that is hard to do and fairly limited. Once you leave Apple's approved and intended path, Apple doesn't help you anymore, but then you're free to do whatever you want. Some suggestions would be a command line tool that accepts arguments, or a command line tool that can communicate over an open pipe with the sandboxed app. There will, of course, be limitations on sandboxed side.