...When someone walks in to the display they trip the motion detector that turns on the power; this turns the lights on on the layout and turns on a MRC power pack.
...
The problem is when the power cuts off this stops the engine abruptly.
Out of curiosity, when the power cuts off don't the lights also turn off and hence the visitor doesn't see the abrupt braking? OK, let's say the power pack is on a timer that turns ON with the lights, but turns OFF before the lights.
To size the capacitor, you'd need to tell us how much power the engine needs...Volts and Amps for example.
I think you'll find you need a ginormous capacitor - perhaps as large as the engine itself - to effect any meaningful momentum slow-down. That is, a typical momentum control on a DC power pack would be set to, say, 5 to 10 seconds? It would take one huge (and expensive) capacitor to run the motor for a similar interval.
OTOH if the abrupt stoppage is a maintenance issue such as slamming couplers and derailing cars, then any slowdown is better than none. So it could be a case of installing whatever fits and taking whatever you get.
The general issue of engine coasting distance upon power loss has been discussed in different OGR threads. If there is any way to add flywheel weight to the motor you are much better off. Of course the motor may not have a flywheel at all! That is, cubic inch for cubic inch, storing momentum mechanically (in a spinning flywheel) is much more effective/compact than storing the momentum electrically (in a capacitor).
I appreciate the keep-it-simple logic of simply installing a capacitor and calling it done. But even if you always run the engine in one direction if installing a gigantic capacitor, I'd want to protect against some summer intern (no disrespect to summer interns intended) re-railing the engine backwards...or during maintenance someone bumps the direction (polarity) switch on the power-pack. That would be a train wreck without some protection to the capacitor...albeit potentially as "simple" as an inexpensive diode.
This being a discussion forum, if the conversation can be expanded to alternative methods, I'd lean toward something on the power-pack side. In other words, some method to slowly change the DC track voltage up and down. This could have the additional benefit of adding interest to the layout such as the train changing speed when passing points of interest or whatever.