I copy them over using a variation of deepcopy (the one from stdlib), and then modify the fluidboxes afterwards. I currently have it hardcoded, depending on the entity being copied (oil refinery, chemical plant, assembling machine, etc), to change the pipe_connections for each entry in their fluidbox table, since the locations have to be modified from the base entity (due to the smaller dimensions)
Specifically, here's an example from the oil refinery part of the code, where "self" is the mini variation of the base entity:
self.fluid_boxes[1].pipe_connections = {{ flow_direction="input", direction = defines.direction.south, position = {-1, 1} }}
I believe it was only the oil refinery and chemical plants which didn't work, and I know the mini tank was still working just fine (though that one uses a different kind of fluid box, so it goes through a slightly different logic). I think the mini assembler might have been working? The user only ever mentioned the mini refinery and chemplants though, and I forgot to test the mini assemblers myself (but they go through the same modifications as the other 2 entities, so I dunno...)