After a day of work and a lot of experimentations I've figured that my error was due to lack of memory (more likely).
I've been running the solution on a 8GB server but somehow, is not enough.
I tried to reduce the amount of data from millions to hundreds and it worked out so I'm now able to do a complete reload with no script error.
I still have the error in event viewer which i can't figure out but still, the deployment is made.
One other possibility is the disk space availability (even if this is less probably since I've GBs free).
So, I suggest people that get this error to try to reduce a lot of their data first and see if the error still occurs. If that's the case, try remove the project and add it again.