The problem I have found is that often they never unlock the toilets. I have no issue with them blocking them during service as it is a terrible design.
But I don’t think the captain should be able to block it. I get the whole rest issue but they could use ear plugs if the noise if the toilet flushing is unacceptable.
Last time it was out of use the whole time there was a constant queue for the middle ones at least 2-3 people deep each side. That’s not acceptable for business class.