I don’t think your approach was wrong. The passengers should know that they need to sit in their corresponding class, so it’s not your fault that they took it upon themselves to do that.
Everyday is a learning day, if you ever feel like trying it again, specify that it needs to be in the same class as indicated on their ticket, then that means anyone who decides to go and sit in First has done so on their own volition, and it keeps you covered too.
You tried to do something good, because if I was in your shoes I’d probably end up doing the same.
Remember, you most likely helped quite a few people on the train that day, particularly those who aren’t able to stand for long periods of time.