State and city lawmakers have mandated denser housing and the electrification of new homes. A weak link has emerged.