Misery:a state of ill-being due to affliction or misfortune;
I don't think the problems workers face due to globalization are non-existent. I do think that they aren't unforeseen (which is the definition of misfortune). I would argue that as programmers, our skills become obsolete faster than those of factory workers in a particular industry. If we can foresee this and learn new programming languages, it should be possible for workers to do this as well.
In short I think any misery globalization brings is avoidable but it would take not just efforts by governments but also awareness on the part of individuals and a willingness to accept change.