Thanks for analysis. So, it was my mistake to copy/paste usage of '
jsonb_object_agg()' from another use-case expecting better performance when
used in non-agg context. Yes, jsonb_build_object() is more appropriate in
this case - however it appeared in 9.5 and I was not aware about it,
therefore was using obsolete approach.