Risto is not a disaster, since they're rebuilding, and will be shedding salary, his cap hit will have little impact on future moves.
It's a bad move, but there are worse moves that have been made.
The Flyers can be turned around quickly by the right GM, they have a decent core of talent, they need to add a couple top players, Gauthier may be one, they should get a top ten, maybe top five pick this summer, with luck, maybe even a 1st for JVR. Clear out Hayes this summer, Risto next summer (only 3 years left on his deal), only Couts and Atkinson will be left (and Atkinson gone the following summer. So a lot of salary and age will be gone by 2025-26.
Provorov and Laughton are tradeable assets, TDA will either step up or be gone in another year. Deslauriers will be buried or shipped out.
The only long term deals are Couts and Sanheim. After this season:
Risto (4), Hayes (3), Laughton (3), Atkinson (2), Provorov (2), TDA (1).