Ageism in South Africa's Software Developer industry is a big problem. The idea that most developer of 40+ years old can't grasp things as fast as a 22 year old developer, because of their age is complete drivel. That said, I can see how this perception is prolific in South Africa: Good developers quickly (~8-12 years) hit a salary ceiling (500k-700k/year depending on sector), which means that they have to move into management or the "business" side of things in order to earn more. This means that a lot of good developers land up on on a different ladder, leaving those who are less skilled behind, creating a skewed selection of older developers. Of course there are still very good developers who either didn't want to change their career for more money, or are so skilled that the salary ceiling doesn't apply to them, however, I expect that these samples don't constitute a majority of the space. The net effect is that there may be some age related correlation in SA, but it's the result of an implicit sample bias in developers, and is certainly not causation.
To the OP: Any competent, non-ageist hiring manager should give a candidate the benefit of the doubt (specifically, that they're still doing what they're doing because they are good at it and enjoy it vs still doing that because they weren't good enough to find anything better). What you may be finding is that you've priced yourself out of the market i.e., they can find a 22 year old to do the job for half the pay - meaning that they don't actually need your experience, and hence don't want to pay for it. You should try isolate the opportunities that actually require experience: lead positions, positions requiring an in depth understanding of the technology and processes, etc.
On another note: I've worked in multiple countries, and for large multi-nationals, and I have found that there is a much larger stigma tied to older developers in SA than anywhere else I've experienced (in fact age is largely equated with experience, not incompetence, elsewhere). The average software dev age where I've worked (overseas) over the last 10 years, has been in the 40-45 region. The reason these guys are still doing dev, is because they're all damn good at it, and are paid accordingly.