Those "metal things that keep the box from pulling out of the wall" are called "sheet metal box supports" or more commonly "steam boats" or "battleships" because of their shape.
The NEC in 314.23(C) requires enclosures (boxes) mounted in a finished surface to be rigidly secured therto by clamps, anchors, or fittings identified for the application. Sounds like what you did was secure the box as best as you could. You used an identified fitting (the steamboats) and additional methods to help make it secure. We would all do the same. Bottom line: it is much better than when you started, so it is an improvement. You are not a hack, rather an innovator trying to achieve code compliance in an adverse situation.
I would have used joint finishing compound and taping paper if the wall wasn't yet painted, and caulking otherwise. It needs to be closed up (NEC 314.21) to within 1/8 inch from the edge of the box to the gypsum wallboard.


Earl