As detailed in this article, the floods probably explain some of the huge swings like Breathitt and flips like Letcher.
But they can't explain everything. Hal Rogers' district, which includes Eastern and South Central Kentucky, is one of the most Republican and Trumpian in the country, and Beshear outperformed Biden there by a whopping 45 points. The Beshear brand is apparently still strong in the Eastern region of the state, with some ancestral Dems still seeing a distinction between the state party and the national Democratic Party. Way more than I thought, actually.
Honestly, I think there's mounting evidence Appalachia peaked for R's in 2016. It's not going to vote Dem under normal circumstances anytime soon, but I do think these voters expected something fundamentally different from Trump-era R's on economics than they got, and they clearly aren't as pro-life as assumed. It's starting to show, particularly in oddly-timed elections when they have to be motivated to turn out. D's didn't win anything of note, but they did do oddly well in the contested western VA races compared to the statewide results.
The biggest reason for this is because Dems have become far too socially liberal for these voters to tolerate. Even in the late 90's when the shift started, downballot Dems were pro-life, pro-gun, pro coal. Obama 2008 still had appeal as he was pretty neutral on LGBTQ and the economy was in shambles. 2012 comes around and Obama's margin collapses further as he focuses a lot more on a minority voter campaign and became more liberal on LGBTQ. Obama was only 61 votes away from losing Elliott county that year, and probably would have lost it if Romney didn't come across as money bags Mitt. 2016 comes around, and what does Hillary Clinton do? She basically throws out her husband's playbook from the 90's calls them deplorables and well the rest is history.