simple firewall question

Is

add action=drop chain=input connection-state=invalid

necessary when the last rule is

add action=drop chain=input

and there are several add action=accept rules in between?

no, because last rule is general, so invalid connections will also be in that rule

True but it depends on the rules that will be in between that two drop rules on the input chain.

Elmar