That's what we do. I hang a "Do not Disturb" sign on the outside and the kids are under strict instructions to not open the door.
I can't speak for all hotel chains but I had a friend who worked for one of them. She told me that all their properties were built to U.S. safety codes, as far as fire and other "threats" were concerned, in whatever country.
Can't confirm this but it might be a good question to ask, to those of you who are concerned about this. Also, many of the hotels we stayed in as Flight Crew had their own water treatment plants on site in some developing countries. Another question to ask a big chain hotel if headed somewhere more adventurous.