From the South African high commission website:
Any foreigner who leaves the Republic after the expiry of his or her
permit shall be liable to an administrative fine of a prescribed
amount not exceeding R3000.00 which fine shall be imposed by the
Department on detection of the overstay and exacted when such
foreigner is admitted or makes an application with the Department.
Failure to pay the prescribed fine will mean that a foreigner will not
be admitted to South Africa, or issued with a Visa or Permit or if
already admitted, a permit shall not be issued or renewed nor a
subsequent permit issued.
So yes, there's a penalty, but while frustrating it's not the end of the world. Certainly no jail time, by law. You definitely want to make sure they know about it and pay the fine, however, as if it's discovered AFTER you leave and you've not paid, you'll potentially be barred from ever reentering. And yes, you may not think you'll return to South Africa, but do you really want to rule that out of the rest of your life?
Whether or not they'll find it is probably subjective, but you can probably at least play the sympathy card with the passport being stolen and so on - give them the details, and if you get the right person they may even reduce the fine, or remove it.
But definitely, pay it, don't try to avoid it.
EDIT: Went hunting for more information.
From South Africa House in the UK (updated October 7, 2014):
A person who overstays after the expiry of his or her visa, as
contemplated in section 30(1)(h) of the Act, may:
In the case of a person who overstays for a period not exceeding 30 days, be declared undesirable for a period of 12 months;
In the case of a person who overstays for the second time within a period of 24months, be declared undesirable for a period of two years;
and
In the case of a person who overstays for more than 30 days, be declared undesirable for a period of five years.
So from there, it seems it may depend on how long you overstayed, but again, no jail.
On the same page, an appeals process is provided, if you wish to make a case to return earlier.
Recently, Zimbabweans have been given a reprieve for overstaying.
The Department of Home Affairs lists a process for appeals for overstaying.