Thank you for the update.
A printed network status sheet (using the printer's control panel) can be useful, and may be one way of finding out whether a network is working properly. If necessary, you could try a new manual Wi-Fi setup (perhaps using WPS, if applicable). Use Wi-Fi Infrastructure Mode (not Wi-Fi Direct Mode). See the user's guide (https://files.support.epson.com/docid/cpd5/cpd54987.pdf) page 40ff.
The specifications for the XP-5100 indicate that this printer model uses 2.4 GHz wireless only, so make sure that the connection to the router is OK. Some routers have a "smart" way of detecting devices and selecting bands, but this can also lead to problems in certain cases.
In case of difficulties with AirPrint, and if all settings are OK, you may want to try the following procedure:
Power off the Wi-Fi router, the printer, the Mac computer, and all other devices/computers. Wait two to three minutes. Power on the router. Wait two to three minutes. Power on the printer. Wait a minute or two. Power on the Mac computer. Finally, power on all other devices/computers.
With access to an iPhone or iPad, you could verify that AirPrint is working with the printer and the router.
Use AirPrint to print from your iPhone, iPad, or iPod touch - Apple Support