Richards cockatoo loves chillies, eating them green or red, even like the devil chillies. What does work is unfortunately not something you will like either, but a nice coat with creosote or Jeyes fluid does keep them away.
If you want to stop them sitting on the rails simply put a thin layer of vaseline on the wood, the slippery feeling keeps them away. Works for the flying rats as well, stopped them entirely from roosting on the piping I put this on. Next time I will be painting window ledges, after somebody does a thorough cleaning, probably using a high pressure cleaner from above to remove the inches of poop.