If the back box is loose then it would require to be fitted securely.
Which could be a matter of replacing screw and wall plugs, or even re-drilling for new ones (but be careful not to cause cable damage, whilst doing this)
But it seems that you have may caused the plaster to become loose behind box and if you are at a plastering stage it would be logical to remove box and repair damaged plaster or as already mentioned sink socket in to wall, for nice flush finish.
The safety procedures to be taken when doing this, would be to isolate circuit and prove dead by means of an approved and working voltage indicator.
Then remove cables from plate, it may well be that the cables are twisted together, it could also be that the cable use two different entry points in to box, so it could then mean that cables would need to be untwisted so cable and back box can be separated.
If they do enter same knock out hole then, untwisting could be avoided.
In the long run if you are considering new sunken boxes, it could well be that the cables will not go through one knock-out. so the twist in cable would then need to be undone.
It would not be wise to have these cables exposed and live, whilst performing the the tasks of any work to fit back box, cables, plaster and plate.
So if using power tools then another source would be required. And if it is required that the circuit does require to be energised at some stage whilst still not within the socket enclosure, you would require to join up like conductors and then enclose them within a safe insulated enclosure to prevent accidental contact.