Section 25. In a town which accepts the provisions of this section or has accepted corresponding provisions of earlier laws, the selectmen, road commissioners or sewer commissioners may, when a town way is laid out, relocated or altered, enter and lay sewers and water pipes therein before possession is taken for the purpose of constructing such way, in like manner as if it had been actually constructed. Such entry shall not be deemed an entry for the purpose of constructing the way, and until such way has been constructed, sewer assessments shall be levied only upon the estates of persons connecting their drains with such sewers. If such laying out, relocation or alteration becomes void under the provisions of section three of chapter seventy-nine, all sewers or water pipes so laid therein shall be deemed to have been legally laid and placed therein; and damages may be recovered therefor under chapter seventy-nine; and the right to recover the same shall accrue when such laying out, alteration or widening becomes void. This section shall not apply to cities.