I'd brush all loose material and dust out for a good key. Then fill the void/cracks with a stiff paste of "Polyfilla" not sloppy- I think you call it spackle? "Polyfilla" is very strong and expands very slighyly on setting. Leave it slightly below the surface, not proud. I use old expired credit cards for the fiddly bits round boxes, excellent tools! I'm not going to insult your intelligence as an electrician about safety. As soon as it sets, which may be an hour, [ Polyfilla is a mix of hemi-hydrated plasters and cellulose flour ], lay on a finish coat:- Flush to the original plaster surfaces with a sheetrock / [UK plasterboard] finishing plaster, [usually pink], larruped-up with a spackle blade as flush as possible. This stuff sets quite fast. As soon as it seems to be setting, but before it goes right off, run a damp sponge over it. This action raises a sort of thin plaster 'cream', which can be sponged flush into the surrounding old plasterwork. For a super finish, trowel it [ UK "polishing off" ] with the flat [ not edge] of a spackle blade or a plasterer's steel float. Needs paint of course, but the client needs to be told not to paint it till it's completely dry. Notice, no sandpaper - you can always see the marks under the paint. As an alternative to the board finish, I have tried 'Polyfilla fine finish', which is a paste already made up, again using an old credit card in tight places. Works fine, just a bit more pernickerty to get the perfect finish, [ and more expensive ].
Alan