Four people died and several more were injured in southern Germany after violent storms with torrential rains caused severe flooding, authorities said.