After applying this small change everything is working perfectly.
In the Carto configuration (app_config.yml) there is a section where you can configure Redis settings.
What I did was, I incremented the write_timeout attribute by an arbitrary value and amazingly enough that did the trick after a restart.
CARTO Builder popups return the last row in your table. That's how CARTO renders a PostgreSQL table. You need to follow this long but very useful workaround to get the sum of all your overlapping polygons:
Add your working layer twice onto your map. One would be the top layer and the other the base layer. You will understand this as you move to the steps.
CARTO Python SDK uses requests library, which follows a pretty standard practice to honor proxies declared as environment variable so maybe you should try to export HTTP_PROXY and HTTPS_PROXY. Example below from library documentation
$ export HTTP_PROXY="http://10.10.1.10:3128"
$ export HTTPS_PROXY="http://10.10.1.10:1080"
>>> import ...