The TlsTcpClient library consumes a lot of memory because the underlying MBEDTLS library requires it. That is, I think, simply because TLS is a complex protocol (so needs lots of code) and needs lots of buffer space at runtime.
There’s an article here that explains how you can reduce memory requirements.
I’ve tried editing my mbedtls config.h file and adding a line like this. System.freeMemory() significantly increases so it’s having some effect on the runtime requirements for memory.
#define MBEDTLS_SSL_MAX_CONTENT_LEN 8192
My current interpretation of how it works is that the normal (default) for that value is 16384 bytes, but you can reduce it if you are never going to send or receive more that that amount of data in one read or write. That includes receiving the certificate chain from the HTTPS web server that you connect to and for that reason you shouldn’t go much lower than about 6KB, so try 8192 for starters. If MBEDTLS_SSL_MAX_CONTENT_LEN is left at its default of 16384 then you can read/write more than 16384 because it sends the data in multiple frames but if you set it to less than 16384 then you are limited to one frame.
I’ve only briefly experimented with this, so don’t rely on it as being a tried-and-trusted solution.