If the aggregated-salary trade takes them below the second apron, they are allowed to make it. It looks like they are really close because of Middleton's unlikely incentives that bump his apron number. Still, to squeeze under the second apron without sending Giannis (ha!), Lillard, or Brook they would have to make it a 5-for-3, sending out Middleton, Portis, Connaughton, Beauchamp, and AJ Johnson for Beal and two guys on a minimum deal, whichever two guys those would be. Having a third team helps here because Phoenix needs to reduce salary as well, because they are aproned.
I'm not saying this is a good idea, but it looks like there are frameworks where they can pull it off - they become a team with four stars (Giannis, Lillard, Lopez, and Beal) and literally every other player on a min deal. But it could technically happen.