Would the 4.7 liter from my 1999 Jeep Grand Cherokee fit in an A body?

I don't think the 4.7L would fit but it is just not worth the effort.
Mercedes has nothing to do with the 4.7.
Chrysler would have been better off had they just not done the 4.7 (& 3.7 v6).
The 4.7 is way done on torque from a 5.2, not too noticeable in the Jeeps as the 4.7 had an improved auto trans ( but the poor souls that traded in a 5.2 manual Dakota for a 4.7 manual Dakota felt screwed!).

That is technically correct, but have you ever had a Benz V8 and a 4.7 out side by side? I have. They look incredibly similar. While Daimler was not involved, they were certainly used as a template. A blind man can see it.

If the 4.7 had been as good as the Benz V8 they wouldda been onto somethin.