The problem was that making changes on all factories required making changes in code in 5 codebases, and it was impossible to merge them into one because of subtle differences how the production lines were working. Also it was impossible to run this software locally, so only tests you could do on live production environment. Imagine testing your software, there is a bug, and you just wasted 2 tones of concrete...
My solution for this problem was making a checklist of all the things that need to be changed and checked before changing, codebase by codebase. Also keeping the changes in SVN helped a lot for implementation reference. Good commit messages and comments in code were essential not to drown in this mess.
In the end, I hired an employee, taught him the ropes and "sold him" to this company. He works there till now and does exactly the same thing (8 years and counting) ;)
Deleted Comment
Maybe this will be the good solution