A strong earthquake off Ecuador’s southern coast left people trapped in collapsed houses.