Schwarber signed for 4/79 (19.75 AAV) through age 32, 2.7 fWAR average last two seasons.
Story signed for 6/140 (23.33 AAV) through age 34, 2.6 fWAR average last two season.
For the Phillies, they are probably getting out from under Schwarber at the right time. If the contract was longer, it would be a big question mark. For now, 3 remaining years don't seem like a big issue to me.
Story didn't adjust well to the AL. Maybe he can turn things around. If he continues to falter, his contract could look really ugly. Being stuck with a glove first 2b in a lengthy contract like that isn't ideal.
Per Fangraphs' Value calculation, Kyle earned his salary last year but Story didn't.