But baring that you need to have a demolition permit.
And one of the things they check before issuing one is if there is anyone in residence. Someone there, legally or illegally, no permit.
That presumes one is going to play by the rules. The squatters aren’t playing by the rules. I betting when you show up with a bulldozer, anyone there will leave pretty fast once you start moving their car(s) around.