Is there any legality in Texas, or anywhere, around requiring a company or entity that is demolishing a building to have 1) The property's electricity provider properly shut off power to the property and/or 2) Having the property's gas provider properly shut off gas to the property. This seems like it would be at least be subject to a fine given the danger of preforming a demolition without these steps having take place.
Laws regarding building demolitions and disconnection of utilities are very local in nature - the city or county - and different everywhere; and, different building codes apply to commercial buildings and private, as well as public and private buildings.
But generally, building and fire codes will require the disconnection of electric and gas service to any building that is to be demolished, and process to do the disconnects and ensure that they are done is handled in the permitting process for the actual demolition.
To (legally) demolish a building, a contractor or a private individual needs to apply for a permit from the local building permit and/or zoning office, because the demolition work has various liabilities in terms of safety, toxic waste remediation, traffic, pollution and impacts to other property owners.
The application (which states the building owner, the contractor and their license (which includes the insurance company) if uses, location, etc.) and the cost of the permit includes the process to ensure that utilities are disconnected by the utilities. For commercial and public buildings, the permit/zoning office and the city will take the lead in the permit process and oversee the demolition; for private buildings, the owner (and contractor, if involved) are responsible for scheduling and ensuring the disconnects take place.
The permits require the signature of the individual (or the contractor, if involved) that states that utilities have been or will be correctly disconnected before work begins. That permit is a contract and it will clearly state what can be significant fines for not following the process, as well as the potential liabilities for fire, adjacent property damage and injuries.
The details on these applications are sometimes forwarded to the utilities themselves and the local fire department, especially in the case of public and commercial buildings, for coordination and verification.
Of course, in rural areas outside of cities, permits and building codes can be minimal. But they can still exist; any city or county building/zoning office will have complete information and applications for the demolition process.