I guess there are a number of issues here:
Too many hive stands have a too narrow base so the whole thing is easily toppled. Squat and wide reduces the risk and mine are heavy too with the cross bars a good foot off the ground. Then strap the hives with ratchet straps.......
If you fence the apiary will they not just burrow underneath? I think an electric fence would be my next step
I too had a slowly tilting hive stand and ended up putting a 2.5 tonne hydraulic jack under the side that was collapsing. I slowly pumped it up watching a spirit level and then excavated under the legs to find solid earth again. a brick and the odd tile - sorted. All done with bees flying and out.....
Next time I might seal them in first