Resolving Web Application Proxy error code 0x80075213

I have have worked on a case where external access to the ADFS service was blocked and the Remote Access Management console on the WAP server fails with this error:

Web Application Proxy could not connect to the AD FS configuration storage and could not load the configuration. Make sure that the Web Application Proxy server can connect to the AD FS server, and if not, run the Install-WebApplicationProxy command.

Web Application Proxy encountered an error while retrieving the configuration from configuration storage.

Log Name:AD FS/Admin

Source:AD FS

Event ID: 422

Task Category: None

Level:Error

Keywords:AD FS

User:NETWORK SERVICE

Description:

Unable to retrieve proxy configuration data from the Federation Service.

Additional Data

Trust Certificate Thumbprint:

10ADAFD5258XXXXXXXXXXXXXXXXXXF78C8436C15

Status Code:

Exception details:

System.Net.WebException: Unable to connect to the remote server —> System.Net.Sockets.SocketException: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond xx.xx.xx.xx:443

As the CertificateHash matches, I restarted the WAP server, and verified the error status.
Finally I used the Install-WebApplicationProxy cmdlet to re-establish the trust between the WAP and the ADFS backend, using an elevated PowerShell command: