Some people on twitter are saying that SPD just by going into opposition and turning more leftwing(idk how thats going to work considering Schulz has been SPD's most leftwing leader since pre-Schroder) will regain AfD voters just like Labour in the UK did with UKIP voters.
Spoiler alert Labour under Corbyn was able to gain UKIP voters by not just campaigning on inequality but also promising to end free movement and not reverse brexit. Its not as clear cut as they think.
I think it is probably more akin to Germany in 2013 where the SPD recovered slightly after being in opposition still agree being in opposition is not a total key to winning. I think the other problem the SPD faces is income inequality is quite serious in US and UK which Sanders and Corbyn could tap into, but in Germany it is not that bad so there is less appetite for a strong shift to the left. Also in the case of Corbyn, most of the UKIP votes he picked up were previous Labour voters in fact there were some previous Labour voters who went UKIP and then Conservative, perfect examples of this is Birmingham suburbs and Stoke on Trent area where the swing over the past few elections to the Tories was quite large. Also Corbyn got a lot of his new votes from younger voters who sat out previous elections whereas with turnout being higher in Germany there is less room for a youthquake. That doesn't mean the SPD is dead by any means, but they have their challenges. The biggest opportunity they probably have is assuming there is a Jamaica coalition, I think they could pick up a fair number of Green votes.