If the loco is not containerisable, it should be possible to move it on the specialised ro ro ships used to carry vehicles, large cranes and other outsize loads, using a trailer that is towed onto the deck of the ship - I'd guess the likes of Wallenius Wilhelmsen (
www.2wglobal.com) would be able to oblige.
Other possibilities are carrying it as deck cargo on a containership or, if it's small enough, using an open flat-rack 'container' or similar.
As an extremely rough ballpark figure (don't hold me to this), I'd say around £10-20,000 for the shipping, plus the cost of moving to and from the ports at either end, which is a bit of a 'how long is a piece of string' item. (I guess rail movement might even be possible in South Africa.) If the load is an outsize one for normal road transport needing escorts it would obviously cost more than if it can squeeze onto a normal truck. Plus bits & pieces like handling in port, customs clearance etc.