InfluxDB connection failed: (Influx URL) connection failed

Is it an https: URL? Do other such sites work for you?

So that's

    case HTTPC_ERROR_CONNECTION_FAILED:
        return F("connection failed");

which is

#define HTTPC_ERROR_CONNECTION_FAILED   (-1)

So see

In particular, in post #4 are some steps to enable the Debug port and Debug Level. Re-Upload to rebuild and try again; see what it says.

You can even try those settings with a simplified sketch that just tries to connect and GET /no-such-path at that origin (scheme://host:port). If you get a 404 or 401 or whatever, that at least is a proper HTTP response, and the connection works.