If it can make a piece of metal in the open hot enough to do 2d4 damage in a single round, then in a closed insulated furnace it would just keep getting hotter and hotter until the heat loss through the insulation equaled the heat input from the spell.
I wonder how much of the extra cost of a masterwork sword is the fuel to run the furnace all that time? This furnace might pay for itself sooner than you think ...
Built a nice brick oven with no air holes and a nicely sealing brick lined door. Since there is no combustion, you don't need a chimney or air flues. I think your only problem would be not forgetting and leaving the door closed too long. If you let it keep adding heat forever, I bet it would get hot enough to just boil away the iron and turn the brick to dust.
I bet a clever alchemist could simply brew up a liquid that would instantly forge the iron into steel. Or even melt the iron out of the ore without any heat at all. Then get an "anvil of steel as soft as copper" and you could hammer out a sword in 20 minutes flat. Add in a "hammer of never tiring arms and masterful smithing" with a +10 bonus to craft checks, and any rookie smith would be masterwork crafting his butt off.
Making too many magical "machine tools" though could be very dangerous for a campaign's economy. Just animate skeletons to work 24/7 on the simple tasks for cheap slave labor (or constructs if alignment prohibits undead), and you could recreate the industrial revolution in no time flat.