Although it is less than ideal, I was able to break the commands into multiple script files due to the errors. By having four separate text files with the dbm commands I need, I created a wrapper script (bash) to put 10 second pauses in between the areas where it would consistently fail.
This solved the issue, and is what we'll be using going forward.
Thanks for the tip on background_server feature.
Best,
Brian