If later we want to replace the legs, and the holes end up in the same places, it means most likely the screws won't have a secure hold since the holes have already been used.
Er, not so much.
There's a persistent myth that screws can't be reinserted into wood, possibly because this may be done most commonly on older pieces (and by homeowners, not woodworkers!) where the holes were already compromised due to wood movement over time causing the holes to be wallowed out slightly and/or the screws being overtightened initially or during reassembly.
With fresh holes and new screws it is careless reinsertion — including failure to have the threads fall into the already formed threading in the hole, and any over-tightening (that can weaken or entirely strip threading) — that leads to problems. If you take care doing this screws can be successfully withdrawn and reinstalled many many times.
You can improve your odds of success with any of the following tips:
Be careful both withdrawing and reinserting the screws. Especially don't over-tighten them. Just snug is usually fine, only one half-turn more than this is too much.
Switch to machine screws or bolts instead. The finer threading on machine screws, even though it is not intended for wood, gives a much better hold than conventional wood screws, especially in hardwoods. Tips on this in the links below.
After withdrawing the screw for the first time the hole cane be strengthened by dribbling in some CA/superglue. Obviously don't reinsert the screws until the superglue has had a chance to set! This is obviously of particular benefit with softer woods, but it's no harm to take the extra step when working with hardwoods as additional security.
I was thinking if there are something like a fastener for wood, that I can drill, install the plastic/metal anchors and be able to reuse the holes a few times.
There are threaded inserts for precisely this purpose; note they are designed to work with machine screws.
But they're largely unnecessary if some or all of the above tips are used.
See these previous Answers for additional info:
How do I align threaded inserts
Threaded wood insert for Beech Hardwood
Embedded nut for using machine screws?