You’re the parent and you get to set the boundaries you want with your kids. You even get to do that if it hurts someone else’s feelings.
But I would challenge your assumptions a little bit here.The problem you’re trying to avoid isn’t your daughter being alone in a small space with a man; the problem you’re trying to avoid is a person being sexually inappropriate with your daughter. A woman can be sexually inappropriate, and sexual misconduct can be in a wide-open room rather than a small space. Moreover, telling this one grownup not to hide in small spaces with your daughter stops THAT grownup; it doesn’t prevent your daughter from being in small spaces with other men—i.e., you are hoping that your daughter generalizes from this to other men, but I think that’s a tall order.
All of that is to say, I think there are better ways to protect your child. In my opinion, the best way to protect your child is to teach her to protect herself. Teach her to listen to her intuition. Teach her to speak up even when it makes other people uncomfortable. Teach her about “tricky people.”
One of my favorite kid books for this issue is Super Duper Safety School. It is very low production value but it hits on some key issues—namely, identifying manipulation and grooming.