Yes you can do that, I run a few external HDDs this way. If you get a new adapter, get a major brand, not some generic chinese junk.
However I am not clear on your goal. You wrote it gets very hot and the miniPC shuts down. You attribute this to a failing power supply? It is likely that if the power supply is still working (producing 12V not safety shutdown) that it has failing capacitor(s). It might be a good test to see if the miniPC runs stably from a molex to barrel plug adapter and go from there... if you already have or have parts to make one, rather than having to decide right now which widget to buy.
At that point, I replace the capacitors and if I have the time, also put the adapter upper casing on a drill press and put in rows of vent holes, then cement it back onto the bottom if it was a plastic welded design that had to be cracked open instead of having screws holding it together. I usually use Panasonic FS or FR series caps from Digikey.
Ultimately, a decent ATX PSU is going to run with 2A more load, for more years than a little 2A/3A AC-DC adapter will. They just don't design them to last long term, being completely sealed so heat does build up if ran at even half the rated current.