Assuming the kit lens on the A5100 neither of these looks ideal for macro
This based on the imaging resoutce Optics page for the relevant lens/camera (Large area covered is a negative for macro). With a specialist lens the A5100 would be best here but I don’t know the budget. Sony tend to be pricey for lenses.
Tha panasonic LX100 looks better, but lacks a folding screen
http://www.imaging-resource.com/PRODS/panasonic-lx100/panasonic-lx100A4.HTM
Here is the imaging resource best macro list
http://www.imaging-resource.com/WB/WB.HTM?view=dp_macro
But it isn’t a great help
The FZ1000 and and Sony RX 10 are stand out all in one cameras. Both are bit bigger and more expensive than the Canon but I’d much rather have them
Final thought I think Olympus do a macro capable kit lens the 12-50 which was bundled with the OMD em-5. I’d buy the lens used and a more modern body with flip screen and wi fi
https://www.cameraworld.co.uk/used-olympus-12-50mm-f3-5-6-3-m-zuiko-digital-ed.html?utm_source=google_shopping&gclid=CL32jo7R7NACFc6_7QodbrwMqg
http://www.imaging-resource.com/PRODS/omd-em5/omd-em5A4.HTM