How to improve the estimated cardinality of inner join lateral
If the joins can't add new rows, then why are f1 and f2 defined to be a set-returning function in the first place?  If they were not set-returning functions, this multiplication would not happen.
Alternatively, declare the functions to be expected to return only one row.
alter function f1 rows 1;

etc.,.