The city becomes one of the first in the country to do so as local governments aim to reduce teachers' overtime and address the declining population of children.