3-way light switch mysteriously works, then stops working, then starts working again
Normal 3-ways are wired like this

Your first part suggests a 3-way circuit where one of the switches is miswired.
There is such a thing as 3+ switches on a 4-way circuit.  Thise switches are added to the middle, and take 2 yellows on one side and 2 yellows on the other side.  They either send them straight through, or swap them.
I use yellow for travelers because they are a matched pair that are interchangeable.  Practical 3-way wiring with cable forces you to use 2 of the 3 available wire colors for travelers, and it can be different on every wire run.  As such, I recommend removing all uncertainty by marking them with yellow tape.  It makes complicated things dog simple.