I'm sorry to hear that! My phone does seem to be a lot better now. I don't know if it's because we had a new router installed, we're with Virgin, or whether it's because of updates to the software from Samsung. There was an update issued yesterday which I did.
Hope you do find a solution.
Unsure how useful it'll be in a specific case, but there's a similar thread here with a suggestion from Graham56 that turning the Wi-Fi scanning off can improve Wi-Fi stability.
Also worth bearing in mind how Wi-Fi is set to run whilst the phone is sleeping (for a UK A5 2017, this is in Settings > Connections > Wi-Fi > Advanced > Keep Wi-Fi On During Sleep).
Failing the above, a new router does appear to be the best fix.
Say "Hello!" to the Community in The Introduce Yourself Thread.