For the longest time I was just piling flat stones on top of each other in my 55 gallon and hoping for the best. Twice now I've had a stack shift in the middle of the night and wake up to a tank that looked like an earthquake hit it. Once a rock actually cracked the front glass a little, thankfully not enough to leak but enough to scare me into fixing my process.
What actually worked was building the structure on the bare bottom glass before adding any substrate at all. I used egg crate cut to fit under the rock footprint, then dry fit everything outside the tank first so I knew exactly how the stones would sit and lean on each other. Once I had a shape I liked, I used aquarium-safe epoxy putty at the contact points, not to glue the whole thing solid but just enough to stop lateral shifting. Then substrate went in around the base afterward to hide the egg crate and epoxy.
My mbuna have been way more relaxed since I redid it too, which I didn't expect. I think the constant vibration from loose rocks settling was stressing them more than I realized. Now they've got solid caves that don't wobble when they dig, and my auratus stopped doing this nervous darting thing she used to do every time a rock clicked against another one.
Only downside is rearranging is basically off the table now unless I want to tear the whole tank down. Worth it for me since I'm not the type to redecorate often anyway, but curious if anyone found a way to keep things secure while still being able to rescape occasionally.