With the amount of money they're both asking for, no. Both of them are really overrated. According to Baseball-Reference wins above replacement (WAR), Judge (5.5), Stanton (4.0), Hicks (4.7), and Gardner (2.8) were all more valuable than Harper (1.3) last year.
The only way signing Machado would make sense is if they had traded Andujar. Since Gregorius will miss at least most of the season, there was an opening at shortstop. But since it's only 1 season at most, signing LeMahieu and Tulowitzki to short-term contracts makes a lot more sense than signing Machado to a 7 or 8 year deal like he apparently wants.