That is assuming that the software writing software can write software sophisticated enough to design robots sophisticated enough to replace humans. Of course there's the possibility of human beings working only as the body for an AI. But that wouldn't be replacing all jobs.
The software may not be able to do that, but it might be able to write better software, that writes better software, that writes better software, that finally does that.
Also known as "recursive self-improvement", "intelligence explosion", or "AI going FOOM".
Once software engineering is eliminated, pretty much all jobs are eliminated, and all bets are off.