With mains voltage 250 V (RMS) Upeak is 354V. Thus, a capacitor with 400V would be sufficient.
In most cases, the low voltage electrolytic capacitor (100μF/16V) is dried out (significant loss of capacity). In other threads the supplier Farnell was nominated:
I know, in theory it should... measurements turned out different in that AP. In the end the capacitor kind of exploded. Since that thing was almost impossible to repair, I replaced the power pcb with power supply (charger) from a Nokia phone. Still working today.
Anyway... this Shelly2.5 unit of mine was just over one year old and it should not be that this specific capacitor is already dried out. I've considered a few causes:
1) these capacitors are low quality and maybe powering off/on so many times caused too much wear.
2) the connected device is a motor (240W) and is >10 years old, these things can generate high current/voltage peaks when powering on/off if not terminated correctly. I wonder if this causes damage to the Shelly power circuit. (I'm already looking for suitable zenerdiodes for extra protection)
3) the loaded firmware that was on the device when I got it was HomekitBG. That software crashed a lot from the start. During last summer every other day, during winter just a few times in a month. Could this piece of software cause hardware failure? (overheating).
Meanwhile I've replaced the device with a new one. Sometime later I'll try to repair the other one. There's a change that I have 100µF/25v somewhere.
At this moment the new device is running 35 minutes in its electrical box. Current temperature outside is around 19ºC (shade) and internal sensor currently is stable at 49ºC (power save mode 2). Running firmware: Mongoose Shelly HomeKit v2.11.1