If you park at Epcot, you don't have to worry about getting back to your car at the end of the night, when you're going to be tired anyways.
If you park at MGM, busses will run from Epcot to MGM until 1 hour after Epcot closes.
If you park at MGM and don't make it out of Epcot in time to catch the bus, leave via the International Gateway exit. You'll be able to walk (~1 mile) and get to MGM, and yes, you'll still be able to get your car out.