Can closed loop steppers be used for extruders?
Closed loop steppers like S42B are becoming popular for the spatial axes because compensating for skipped steps is the correct way to recover for those axes. For example, if the nozzle knocks into a warped corner of a print and skips, the right thing to do is compensate, commanding additional steps necessary to get to the commanded location.
This is less valuable for extruder, since displacement is not necessarily the target we want to recover, but nozzle pressure. Extruder skip usually occurs when nozzle pressure exceeds the motors ability to drive the filament. Correcting for the skipped steps may result in overcompensating, attempting to drive nozzle pressure up over a longer period of time, since the problem won't clear itself as quickly as it does for the spatial axes. Compensating for skipped steps doesn't recover E errors like they do for X,Y, or Z, since skipped E steps tend to be driven by persistent problems, like low nozzle temp or hotend restrictions, where spatial errors tend to be transient, e.g. hitting a 'speed bump' on the print.
An alternative is filament flow sensors like this BTT Smart Filament Sensor. It uses a similar feedback mechanism like you suggest. It uses a driven wheel and encoder to send pulses to mainboard. When mainboard stopped getting pulses during commanded moves, it pauses print. Instead of trying to correct in a closed loop fashion, its a human-in-the-loop solution