Controlling the Power of a Solenoid
Without knowing the current and voltage, only general advice can be given.  I would do one of two things:

Keep the mechanical relay and adjust the solenoid power by what voltage the capacitors are charged to.  A mechanical relay is simply not appropriate for the kind of timing you want.  You aren't going to get what you want trying to modulate the on-time of a mechanical relay.

Fully charge the capacitors as now and use a solid state switch.  A low side NPN or NFET would be the easiest to control.  I would not use a solid state relay directly.  These are slow and can have significant voltage drop.  If you need the switch to be isolated, isolate some control circuitry with it that then switches the bare transistor.