I don't think the Sox thought they were giving up a player anywhere near as talented as Devers is in any of those deals.
Shaw was a mistake in hindsight, but he was a 27 year old who they thought was a AAAA platoon guy. Devers is only 21 and reached the majors at 20.
The Gagne and Elias prospects never became anything unless I am forgetting something.
The Red Sox have actually been smart about their prospect trades over the years. Basically if the Sox are offering a prospect, you should just back away because something is wrong with him. The only prospects I can remember them trading who were actually good were Hanley and Moncada, and they got Beckett and Sale out of those deals.
The Padres are overplaying their Hand here. Relievers are the most replaceable players in baseball, and their long term success is almost always a big gamble aside from a few elite guys.