Looks good to me.
Compact script to check optimizability and reload optimized rendition of table fw4 (in defaults joins zone jumps 3x which visualise nicely)
Effect shows where you have adjacent rules with different port/ip/flag/whatever that converts to a list as an example. It makes just list which is properly visualized as any other lists.
#!/bin/ash -x
A=`mktemp`
echo flush table inet fw4 > $A
nft list table inet fw4 >> $A
nft -c -o -f $A && nft -o -f $A
rm $A
Edited to keep counters and dynamic map/set content.