Sean,
Three thing that might help.
If there is a chance the program is crashing while using the DIRECTORY command see my article about problem using the old form of directory in a TS environment DirectoryCrashWithUserProfiles
You can set your program to run on only 1 CPU using imagecfg with the /u parameter. Years ago I had program that crashed running in terminal services and this solved the problem. More that likely there was a threading issue that forcing the program to a single CPU “fixed”.
Eliminate circular references between your DLLs if you have any. I’ve found that running under TS with programs with circular references are much more likely to crash than running on a workstation. The crash is usually when a thread or the application is closing.
HTH,
Rick