If the Spurs take on Hayward it's not because of his on court contribution, but because there are additional assets attached (no. 13, no. 15, Kai Jones, PJ Washington, etc.).
Hayward has 2 years left @ around 30M, McDermott also has 2 years left but at around 14M. A more feasible scenario would be packaging McDermott + Poeltl + filler (Langford, etc) for Hayward + Kai Jones + picks (no 13 + no 15 + possibly more). I this case you're basically adding an extra year of cap burden (the second one) for those assets.
Not saying it's ideal, because you may very well get part of that by simply using Poeltl and there may be cheaper ways to unload McDermott, but if there's a scenario where we take on Hayward, it's more likely something like that.