Even after gelding some of those behaviors may not go away, especially if he's been used as a breeding stud in the past.
I've been around & handled stallions all of my adult life (family has raised horses for decades, started handling the stallions as a teenager) I now own 2 myself. My grandfather told me as a kid "Never turn your back to a stud no matter how much of a gentleman he is." Mine are big puppy dogs, never take a wrong step or act out of place but the possibility will always be there as they are creatures with a mind of their own and a lot of times hormones override their thinking. With a novice handler, I could possibly see either of them taking advantage of the opportunity.
I have another who was cut later in life (almost 5) hadn't been used as a stud, even now as a gelding he has moments that he acts more studdy than the actual stallions on the farm.
Life is like a camera. Focus on what's important, Capture the good times, Develop from the negatives and if things don't work out, Take another shot.