Thousands of people on the outskirts of Thailand's capital were being evacuated on Monday as firefighters battled blazes for hours after a factory explosion that killed a rescue worker and wounded 29 people, officials said.