How to build an electric rat trap / deterrent
Would this setup work?


No. This circuit is complete nonsense -- the voltage from a 12V battery is too low to produce a shock, and connecting capacitors in series with the battery will prevent any current from flowing at all. Unfortunately, I suspect that the tutorial video you watched was fake. (Sadly, this is rather common.)

Creating a circuit that would be effective in this scenario would involve completely different parts -- one option would be to use a transistor oscillator, a high frequency step-up transformer, and a voltage multiplier, similar to the circuit used in an electric flyswatter. However, this would require a lot more parts and some careful design -- there is no way of turning the parts you currently have into something functional.