Whether it is cruel to lock the cat out of the room at night depends on the specific situation and whether the cat's needs are being met. If the cat has adequate food, water, a litter box, and a safe sleeping environment, and there is enough space in the room for the cat to move around, then locking the cat out of the room door for a short period of time may not have a serious psychological or physiological impact on it. However, if a cat is locked out of a room for a prolonged period of time, it may feel lonely, anxious or stressed, which may affect its welfare.
When considering whether to lock the cat outside the door of the room, it should be ensured that the cat's basic needs are met and that there is appropriate environmental enrichment in the room, such as cat climbing frames, toys, etc., to provide mental stimulation and satisfy the cat's hunting instincts. In addition, cats are nocturnal and they may be more active at night, so locking cats out of rooms at night may limit their natural behavior.
Overall, occasionally locking a cat out of a room door at night may not cause it serious harm, but it should be ensured that the cat's welfare is the primary concern. If possible, providing a safe indoor environment where the cat is free to roam at night may be a better option. Cat owners should carefully consider the individual needs and preferences of their cat before implementing any decisions.