Devers age 25:
140 wRC+, 4.9 fWAR
Judge age 25:
174 wRC+, 8.7 fWAR
Judge is a better hitter. He k's a lot, but has a better OBP than Devers due to his bb rate. Judge is a better fielder. While some consider Judge a health risk, Devers did miss some time this season with an issue and we don't know how his body will continue to age.
In this scenario, I still take Judge as it may even be a better contract as it reduces the AAV.