He got hurt, Kapler never seemed to take to him, and also he wasn't playing especiallly well and the team was in first place. So somehow that disaster of an analytics staff also drew the conclusion that Kingery was the better option (defensively), plus there was still pressure to make Kingery look like he was worth his contract. And then they reversed course and brought in a worse defensive player who also didn't hit, while still refusing to send Kingery down.
I think Machado was also a big factor. They went into the off-season thinking they might let JP and Franco fight it out for 3B (and Machado's bat would make a lighter-hitting 3B okay) and maybe make the position switch down the line. I truly believe they only started to move off of Machado after the playoff "controversy," soured Middleton, and even then Klentak would have picked Manny over Harper left to his own devices.
Then the Mariners deal came along, which still wasn't a terrible trade, just a classic squandering of future WAR for present WAR. Had the two relievers done more (Nicasio was okay, just overpaid) or had they been able to get Diaz (even though hindsight says that would have been disastrous) as they were attempting when talks began it would have been better too.
Also kind of forgotten in all this is how the Phillies weren't willing to trade Cesar. I know they were never happy with the offers but at some point it shouldn't have mattered. That was also a casualty of being in first place at the 2018 deadline, and going all-in for 2019. A team that was still rebuilding or even just modestly improving (which they didn't do anyway) would have put Crawford and Kingery out there in 2019 and let them take their lumps. Would that team have traded for JT? Or even signed Harper? Probably still the latter at least, he didn't have that many options and his second choice wasn't about to win either.