The OP's brakes have 'lost performance'. Please specify what meant: braking effectiveness? If that, it's not the cables.
Cables do not stretch, other than elastically, when tension is applied, iaw Hooke's Law. They return to their original length when tension is removed.
Brake cable outers compress (you can get 'compressionless' ones - they aren't but as good as) but it does not affect the operation of rim brakes. 'Compressionless' outers are recommended for mechanical disc brakes to optimise their modulation.
What some can take for 'stretch' is how, after installation, the ferrules 'settle' under compression and that reveals itself as 'cable stretch'. Recognition of this risk allows the fettler to mitigate it.
I would not buy 'e bay' ones: buy them from a reputable bike shop; on-line or, better, your LBS. Must be 'stainless' (not galvanised).
If the outers remain apparently rust free, in good nick and low friction, brake cables can last for ages. I would replace them (cable and outer together) either:
a. When cable release (normally friction increase) drops, not on a schedule
b. When threads of the braided cable fracture or spike out (invariably where the cable's been clamped or under the BB shell). This is worth an occasional check: finger and thumbs are sensitive, ime. But because brake cables are mostly clamp and forget, ime front gear cables are much more likely to be damaged in this way (repeated reclamping).
I'd be interested to hear where (on the cable)
@Sharky 's brake cable "snapped".