I am going down the same rabbit hole now and would summarize filament detection types into four categories: runout, extruder issue, reel jam, and nozzle jam. In fact, that's what BTT advertises for their sensor so nothing controversial here.
The mechanisms used to detect these issues are based on movement or force. Since detecting force itself is not always easy or intuitive, it is also common to convert force into motion. The sensors involved include:
- Micro-switches that detect physical presence either by the filament or something acting on the filament
- Load cells that detect force directly
- Optical encoders that toggles a signal proportional to the speed of a roller acting on a filament (just like the scroll wheel of your mouse) They can also be use as a contactless switch similar to a micro-switches usually with the goal of lower resistance on the filament
- Hall effect sensors that act as a contactless switch
When a filament ends, it is physically not there anymore which is why a micro-switch is an easy solution. But when a filament jams, the effect is a change in tension of the filament that exerts a force on different parts of the extruder path. From the extruder's perspective, when there is a reel jam it has to pull harder, when there is a nozzle jam it has to push harder. If the extruder is damaged, it is not able to push or pull the filament. In all cases, the filament doesn't move at all.
In this answer, the filament sensor tries to detect a reel jam by converting the tension in the filament into a mechanical motion that activates the micro-switch. That design is optimizing both runout and reel jam into a single switch action. Other sensors can be used in place of the micro-switch given enough R&D.
Optical encoders (aka smart runout sensor) use the movement of filament to toggle a signal. Like a heart beat, a beating signal means filament is moving while a still signal is a potential sign of fault. The printer firmware must support this type of input for encoders to function. Optical encoders require the firmware to keep track of when the extruder is commanded to move and check that the encoder feedback matches those moves. If the feedback doesn't match the command and it exceeds some threshold, then the firmware treats it as an error. This "threshold" is what people refer to as tuning a smart runout sensor. For Marlin, the FILAMENT_RUNOUT_DISTANCE_MM field sets how much mismatch is tolerated before an error occurs. Note that this is tied to the design of the encoder and it's resolution in tracking filament movement.
One other consideration for sensors is contact vs contactless. Anything that contacts the filament adds resistance that the extruder has to overcome. It might only be a significant issue when building larger systems where the reel is far away and the total resistance from sensor and tubing starts to add up. Contactless is certainly a good idea, but is also more complex to design. For example, optical contactless that directly detects filaments can have issues with transparent material.
In summary, I think optical encoders are currently a good comprehensive solution to filament detection. The main trade-off due to it's resolution is dealing with false positive triggers and potential grinding of the filament that would worsen a fault condition if the detection takes too long. The traditional switch tends to detect immediately a real condition and lets the firmware react faster but detecting multiple types of faults require more complex mechanics.