If your plan is to simulate the recoil by powering the backward movement and electrically controlling the return you need to understand the solenoid that you will be using. It is probably best to use one with a spring return.
What you would have to do is apply full power to draw the barrel back then reduce the power slowly back to some level to allow the slower return. It sounds like this is what you had in mind with the capacitor. If this is the case then you must be sure the solenoid/spring will actually do this. The pull of the solenoid/spring combination might also have a snapping action on the return. I'd put the solenoid on a variable power supply to see how it behaves. If it appears that it does return somewhat in proportion to the voltage reduction then make note of how it behaves - it may not be linear and it make be that the solenoid returns to the original position at something more than zero volts. It might also take less than 7.2 volts for full drawback. I'd suggest graphing the voltages at various positions- open,75%, 50%, 25% and 0.
The coil will have a DC resistance. This will determine how much power it uses to stay open - and will give you some sense of how long a capacitor might hold it back.
You will have to determine how long you want to hold the barrel back - the longer you hold it back - the larger the capacitor. Start with 1 second.
What you'll need to do is estimate the size of capacitor required to provide the voltage decline for the voltage and resistance you have. That's fairly involved but if you posted the info here - someone could help you. You might also experiment by just adding capacitors. If all you know is the DC resistance of the solenoid (or the current at some specific voltage) post it here - and someone could estimate the size of capacitor that it would take to go from 7.2 volts to 2.4 volts (about 1/3) in one second - just to give you an order of magnitude feel for it.