nostr:npub1wp9ephdvgmsgu70rcpua7c42qxjgeqd8sk2nr944er4m4m290sfss8sr7q I have this option in my aerc.conf enabled for threading.
threading-enabled=true
You see more options in their git repo here if it helps ?
https://git.sr.ht/~rjarry/aerc/tree/master/item/config/aerc.conf