Allow me to be the voice of reason here.
While anything is possible, an engine swap is an incredible
amount of work. Not only do you need to make the engine physically fit the car, but then work out all the electronics, hydraulics (the Miata has a hydraulic clutch), fuel injection lines, ignition switch interfaces, etc etc etc. That is only using a similar size engine, like the Miata. You get into a V6 or V-8 conversion, then you have to deal with other hard issues like exhaust, suspension upgrade, chassis strengthening, bigger brakes to stop your much faster car, etc etc etc. No telling where it will ever end.
Now, I can support some engine swaps. One of my personal favorites is removing the truly awful drivetrain from a Triumph Spitfire and replacing it with, well, anything else.
This makes sense because the standard engine in that car is notoriously unreliable as well as underpowered. The same cannot be said of the Fiat 124. With mild to moderate maintenance, the dohc will run reliably for 100,000 to 150,000 miles. Performance for it's displacement is rather good. Parts are generally not expensive, though you will find that 1438cc unique items can be hard to come by. So, to go through all the agony and effort of installing a Miata engine (a very good engine) won't really advance you much, especially when you could install a FI 2.0 engine from a newer Spider and achieve most of the same goals without having to fabricate much of anything or try to make a different trans fit.
I'll say the following, which I mean sincerely and not as a slam to the current owner, but it's true: if you prefer to have the "reliability" and other benefits of the Miata drivetrain, buy a Miata
. It's a wonderful car, and I for one won't hate you for it. It does everything better than a Fiat, except maybe look good.
You can find a decent used one for $3500, which is probably what you'd spend rebuilding a Fiat engine and paying someone to install it. So it's really just a matter of asking yourself what you really want: an old Italian car with character, or a very, very good car that anyone with a checkbook can own.