Jari-Matti Latvala has closed out day two of the Rallye Deutschland in firm control, as title rival Sebastian Ogier crashes out.