The most bulletproof way to implement this is to add a timer helper. This will ensure that if HA restarts while your automation is running, then your fan will stop once HA come back online.
The way to do it is to create a timer helper named fan. Then, create an automation with 2 triggers, one for the button press and the other for the timer state turning to "idle". Make sure you assign a TriggerID for each of these triggers (eg. button press & fan timer idle).
Skip the conditions section, then use a choose in your actions section & create 2 options:
When triggerId is button press, turn on fan and start timer.
Thanks for your advise! Eventually I found the “Blocks” tab which I did not recognise before and which has a build-in wait action which I assumed must be in there somewhere! I am fine with that as it is not super crucial to stop the fan at any time.