How would I specify for an area *outside* a square area?
Solution 1:
You didn't specify why the solution in the linked post didn't work for you, but in 1.13 there's actually a better solution:
/execute as @a unless entity @s[x=…,y=…,z=…,dx=…,dy=…,dz=…] run <command>