I've had my Victorian flat rewired and this involved moving electrical sockets from the skirting boards (baseboards) leaving rectangular holes in the wood. Is it possible to patch these and repaint or am I better off replacing the boards?
You would need to patch it with small blocks of wood called a dutchman.
Cut a block of wood to roughly the same size and shape of the hole. Make sure it is slightly over sized. Then hold the block up to the hole and trace around it. After this is done, use a chisel and carefully chip out the hole to match the size of the wood patch. Don't cut through completely, leave about 1/4" of wood left inside to give support to the dutchman.
When the hole is cut to fit the dutchman, carefully apply a little glue to the opening and the wood and press it in. At this point, the patch will be sitting proud of the wood, this is normal. Once the glue has dried, take a belt sander, or a hand plane and take down the dutchman so it is level with the surface. Any cracks can then be filled with wood putty. Then you can sand and paint the trim.
I'm not sure if there is wood grain texture to the board or not. I actually patched a hole in my front door (painted white) by using Plastiwood and then taking an awl and mimicking the texture before repainting. It turned out incredible.
Updated with photo:
I got a little carried away with too much texture, but keep in mind that this is a closeup. Most people would never even notice.