Is it possible to configure wifi to disconnect more aggressively when the signal is weak?
There is a setting in iOS in Settings > General > Cellular -> Wi-Fi Assist, which uses the cellular data when wifi is bad.

However, this is on by default, so it may not be helping in your particular case.