But yes, I think you are largely correct. Peer level conflict is something where we assume whatever capabilities we have the enemy has as well.
If we can strike their country they can strike ours. So yeah, our robot making industry would likely not last long.
On the other hand if we have war fighting robots then we must have building robots.
So our robots are rebuilding the factories that the enemy is blowing up so they can resume building robots.
And the factory-building robots would themselves be a target, as would the tech base needed to maintain them.
This leads to the question of how much of the economy can be devoted to war production, and how long that can be maintained before they run short of something essential to the whole effort.