I’m afraid you have to build Element from source (at least convert deb designed for debian to rpm with alien) and use a powerful redsocks proxifier (based on iptables). Note: by default redsocks sends DNS queries directly, not through a proxy and you need to run the proxying application from another user.
redsocks is very difficult to set up, but worth it. It can even proxy VirtualBox.
But the easiest way is to use the web version of Element and configure the proxy in your browser. Disable WebRTC, HTTP3 (QUIC), IPv6, and proxy.failover to prevent leaks.
In Firefox, these options are in about:config:
media.peerconnection.enabled (false)
network.http.http3.enable (false)
network.dns.disableIPv6 (true)
network.notify.IPv6 (false)
network.proxy.failover_direct (should be false)
network.proxy.socks_remote_dns (true)
It is not recommended to logout of the browser and clear cookies. You can have a separate browser for this.