Unmarked minefields, or air-scattered mines of infinite duration, are the bad kind.
A well-marked, time-limited or centrally controlled minefield is generally much less dangerous, on par with a razor-wire fence. Functionally, it's a sentry system which can be turned off electronically (or by waiting past a certain date), or at worst, which is marked on maps well enough that individual mines can be removed safely by engineers.
Unexploded ordnance (i.e. bombs which you fire and which then fail to explode) are a bigger threat after a modern battle than US-style minefields.
A minefield is probably much less likely to be deployed for this than automated sentry towers, however.
We do this in limited areas already -- there's razor wire and other "obviously dangerous" stuff protecting power substations, subways, power plants, etc. DoE-mandated security contractors will use lethal force at nuclear sites, probably with limited target identification.
I agree doing this over a 2000 mile border is a bad idea. For that, we should try to develop 0-50mi deep monitoring zone (depending on the area), with seismic sensors, UAV overflights, etc., and then whenever anyone is detected, send CBP/ICE agents to intercept. If they're innocent hikers, no harm done; if they're drug/people/etc. smugglers, detain and process them.
That's largely what we do now. The main issue is insufficient CBP agents, and no real consequences for illegally crossing the border ("catch and release"). I think punishment should be much harsher for anyone involved commercially in running the border, and somewhat harsher for people who do it repeatedly.
Ultimately the best solution is to make Mexico a less shitty place to be.
Well, that's all pretty reasonable, including the harsher penalties for people who run the border for a business, but still, seismic sensors and UAV overflights? That's just too close to home for me, I don't want a militarized border if it can at all be avoided. Aside from the monetary cost, I think it's detrimental to society -- is immigration such a bad problem that it requires that drastic a step?