That makes sense.
Easy peasy!
Just buy a cheap chinese vfd. Check the specs first for maximum ramp rate.
A Toshiba that I just looked at was 600 seconds. Program it for 5 minute ramp up and 5 minute ramp down.
Connect a bath fan timer to the “run” terminals.
It will ramp up for the set time. Run for the fan timer setting. Then ramp down at the set rate
Up and down ramps can be different.
A .4 kw vfd will run a 1/2hp motor. A 1kw is not much more money and will control larger than a1 hp motor.
Should be less than $100
For those in USA. A vfd will run a 240v 3 phase ac motor on 120v household power.