Thanks for visiting the Apple Support Communities letsgetelectric,
For issues connecting an iPhone to Wi-Fi, we recommend following the Apple Support provided troubleshooting for the issue here: If your iPhone or iPad won't connect to a Wi-Fi network - Apple Support. It looks like you've already done a good bit of the steps mentioned, but please review it to verify you've done them all.
If so, we suggest seeing if there may be an issue with the number of devices connected to your network. Depending on your network, it may limit how many can be connected wirelessly at one time. This can result in difficulty getting, or staying, connected once that limit is reached, and may also cause other performance issues. It's possible that, since this is a new phone to your network, your network may just already be at its capacity when you're trying to join.
To help us determine if that is the case, please remove all wirelessly connected devices from your network. This includes not only your smartphones, but computers, smart TVs, game consoles, and other smart appliances. If a device is connected via ethernet, you can leave it connected. We only want to remove the wirelessly connected devices. This can be done by powering them off in most cases.
Once all the other devices are removed from your network, use your replacement iPhone to join the network and test out its performance. If it works without the issues you've been experiencing, it is likely to be the number of devices connected. We would recommend powering devices off or otherwise disconnecting from the network when not in use to ensure the network does not reach the capacity.
If, however, your iPhone still exhibits the same symptoms while it is the only device connected, we would recommend getting in touch with Apple Support directly for further assistance. They will have access to additional tools and resources to further investigate. You can do that here: Get Support.
Have a lovely day!