RaspberryPi I2C sensor - capacitor's role
isn't it true that the capacitor will stop as many Volts it has written on it


No. 

Capacitors

It's the opposite of what you want. You want the protection device to pass low voltages and block or attenuate high voltages.

Capacitors are not designed to be used as fuses, therefore you cannot really use one as a substitute for a voltage or current limiting device to protect IC pins.

The voltage rating on a capacitor can't really be relied on in that way. I wouldn't be surprised if a specific 60V capacitor that passes a 60V AC signal also passes a 120V AC signal. The rating only means the manufacturer won't guarantee the cap works above 60 V, they certainly don't guarantee that it fail at exactly 61 V (say).

IO Protection

What you are looking for is a "voltage clamp" or perhaps a polyfuse or similar.

Arduinos also have this problem of unprotected IO. There are variants that include better protection which seem to me to be a useful example

From here

"Every I/O pin is protected by a 5.1V zener diode and 220 ohm 30mA PTC (resettable fuse). The equivalent circuit is shown in this figure"


You'd have to adjust component values for a 3.3 V microcontroller or SoC such as the Rpi.



See also Pi GPIO protection - using (sacrificial?) buffers with ESD protection on a daughterboard.