The days of swapping V8 engines for six cylinders is long gone. In addtion to making the physical swap, you would also need to swap transmissions, likely axles, exhaust/emmission controls, and likely most of the wiring harness and computer connections/sensors, fuel tanks,etc. Modern powertrains are precisely calibrated systems, and you cannot change one element without impacting all the other elements.
Your car would never pass an emissions check again, which would make it impossible to sell in most states.
Not only a bad idea, but an impossibility for the most part.