I had struggled with my hormonal cockatiel last year (hopefully it won't happen as bad this year). I learned with Felix I can't really stop his behavior, but it can be reduced.
Changing his diet to dry bird bread in the mornings... versus the typical mash... helped. I made mine full of veggies so it was as healthy as possible. Now that is less hormonal his is allowed mash again.
Daily sunshine and showers are good distractions.
Foraging is also helpful. I would give him his seed mix dinner covered with paper.
Do not let him anywhere "nesty". My cockatiel would fly to a wicker-like basket of mine. I didn't realize it was triggering him until he started hissing at me... even if I was across the room... and being extra aggressive while he was on it.
Increasing training (hands-off is a good idea) is another good distraction. As well as exercise, like indoor recall.
It was kind of a interesting cycle with masturbation. I imagine every bird is different, so this is my experience. Taking objects away eventually is necessary, but you can't just take everything away. I would let him have his "love toy" for a few weeks, but set it up so it was only one toy. Then after the weeks, change his toys around and take it away. He would still find a new one, but eventually he has cut down on the amount (and how many toys he does it with) strongly.
So a year ago it was his obsessive habit. Now it is just his hobby on the side. If that makes sense haha.
If he is really, really hormonal then taking toys away won't work well. But once he calms down a bit, it's worth a try.
This is my experience, I hope it helps.