Reverse proxy HA (ssl) with forward proxy squid - SSL handshake fail

This is not SSL.

You have configured Haproxy for SSL, and the request that arrives is not SSL.

As per the curl documentation:

https://curl.haxx.se/docs/manpage.html#-x

HTTPS proxy support via https:// protocol prefix was added in 7.52.0 for OpenSSL, GnuTLS and NSS.

Unrecognized and unsupported proxy protocols cause an error since 7.52.0. Prior versions may ignore the protocol and use http:// instead.

So in other words, not only does your curl release not support SSL for proxies, it also silently falls back to plain text HTTP without an error.