I know that all kids go thru curiosity about their private parts and some situations are much worse than others. Because this little boy has taken it to the level of exposing himself to others, I would also consider that a problem. I'm sure since this is not the first time this has occurred, you and your husband have talked to him about how wrong this is. Maybe you can explain to him that he is violating the other person's space by doing such a thing, and that if he takes it a step further by touching someone else, there will be very big consequences. Maybe explain that people get in trouble with the law for exposing themselves or touching other people that do not want to be touched, and there is nothing funny about it.
I had a situation happen last year between my stepson and my friend's two girls - all ages 6-8. I caught them talking about touching eachother and thankfully no one had taken it there. But I had to explain to them that our private parts are our personal property, and not for anyone else to look at or touch. I explained that there will come a time when they are much older to explore, and that they should always feel ok to tell a parent or other grown up if someone has touched them in any way. I also added that if I heard or saw any type of that behavior again that they would all be in trouble. I called the girls' mother right away to let her know what happened. I wanted her to be aware.
I hope that this is helpful and you can resolve this issue. I know you must be frustrated! Good luck to you. God bless!