Any alternatives on how I could rework the query or the my_srf_func to speed things up, without having too many subqueries?
Placing the SRF function in the target list is now largely deprecated. Table producing functions belong in the FROM clause. The introduction of LATERAL joins made this possible. My preference is to retain the JOIN syntax.