To put some data into this, in August of 2023 according to
BTS 22% of flights into SFO were delayed 15 minutes or more. I would generally agree with
VSLover's suggestion of coming in the day before, or at least taking the 5 hour layover.
If you elect the day before option, there's no particular need to stay at an airport hotel, especially with a 7:25pm departure on Monday. Fly in at a reasonable time on Sunday, take BART into the city, book a hotel with a late checkout, and take BART back to the airport Monday afternoon.