Yes, according to Suntour's own website, it's Infra Red, and a part of their own ATS system here:
http://www.srsuntour-cycling.com/e-bike/ats-rear-motor-system/
There're instructions to download there (although out of date) but sadly no troubleshooting or maintenance help for this issue.
Looking again at the OP's first set of pictures, that last picture seems to have one screw securing that plastic back cover that looks decidedly out of place (clean, oversized head and countersunk as opposed to the other roundhead and rusty ones)... maybe someone has been fiddling with this sensor before?
Either way, it seems odd to use an optical sensor in a place which is prone to dirt and splashing, but at least original parts are still available if needed.