BERLIN—German producer prices jumped at the fastest pace on record in July, underscoring the gloomy outlook for Europe’s largest economy, which is stuck in a stranglehold of soaring costs and weakening growth due to the Ukraine war. Producer prices—a leading indicator for inflation—surged 37.2 percent on the year, the biggest rise since records began in…