When you create a room, you can set the room to read-only. In that case, only room owners can send messages in that room, but this property cannot be changed after the room is created.
// Java BDK Example
V3RoomAttributes attributes = new V3RoomAttributes()
.name("My Room")
.readOnly(true);
bdk.streams().create(attributes);
If you need those members to send messages, you will have to promote them to owners then revoke that later. However, at any point of time in between, they can possibly mess with your workflow by kicking the bot out of the room etc.