The biggest factor IMO is that he never developed his offensive arsenal, the league changed, so his game plateaued badly. You throw in a few injuries and trades and you’ve fallen down a deep rabbit hole. His attitude/ego didn’t help matters.
Because of his athleticism and defense, he can still be a great 3rd option or high-end role player for a contender. If guys like Capella, JaVale, and Tristan can excel in that role of physical presence/rebounder/occasional pick and roll alley-ooper...there’s no reason somebody with Dwight’s talent can’t.