What is the name of this filter?
There's no known name for this kind of filter in the signal processing world, as far as I know – and what good would such a name be, anyway?

So, I'd describe it in a signal processing context as "discrete state moving window sum with threshold", since it's a non-linear filter (and not much of a signal filter, if you ask me!). Simply because that's how I'd implement it: Sum up the last $W$ states, and output a 1 iff the result is $W$.

If you leave the realm of signal processing and think more of the basic electronic circuits that implement that, or by the purpose: You could call it a watchdog, or a digital anti-ringing, or a self-resetting cycle counter with a threshold, for example.

Your approach with the latch is from the latter category of names; "latch" is not anything that I'd call a filter in a signal processing context. Especially, the functionality you describe is not a latch (alone).