Concurrency mechanism for ensuring repeated threads are executed in a given order
Because of the initial constraints (a for loop for two threads different why one prints &quot;foo&quot; and the other one prints &quot;bar&quot;) set by leetcode site on the problem I see no alternatives to the way you solved it. Answering your first question:

Do you see any cases, where this solution would not work? (Assuming
the input is correct, i.e. n&gt;=1.)

None, because you are setting the guard condition to one initial value (0) and you are ensuring the alternate order with wait and notify.
Your second question:

Do you see any issues with performance? (I know the code waits in a
while-loop, but it calls wait, which is supposed to be optimal.)

Again, following leetcode constraints there are no alternatives, while it seems that from some solutions posted on the site if you are less strict with constraints performance can be better, but this is probably bound to the fact that
threads just print one string and nothing else, so wait and notify calls represent a significative portion of working time.
Your third question:

In general, is there a way this solution could be improved?

You can use for the lock instead of your static class an Object instance and a boolean variable for the condition, but result should be quite similar.
Fourth question:

Does this pattern (threads running multiple times in a given order and
waiting for each other) have a name, or a high-level Java concurrency
object which implements them? (Slightly related: what better name
would you give to syncer?)

I see this situation like a token ring anomalous case where the token is in this case the value of the status guard, with more than two threads you could use a String token with the name of thread that would be activated.