You might want to seize the opportunity to add a metal plate to prevent the sensor arm from coming out. This is the repair I did to my front sensor where I pop riveted the bracket with about 1mm clearance between it and the sensor arm.
Also, judging from your pictures, you need to free up the connecting rod ball joints. I think a reason the sensors fail - search the forum with
Low beam Fld/Vision for lots of posts about how the arm pops out of the sensor - is the ball joints get packed with muck and the connecting arm locks solid which helps to lever the sensor arm to pull it out of the sensor. Whatever, it is rubbish design - a circlip in the sensor would hold the arm in.
You say "I think it observes relative, not absolute motion". I don't think so or it would not keep the lights aligned. I think the magnet? (it could be capacitive) and three chips must observe the "actual position of the sensor arm" which is a function of the suspension height and therefore the angle of the car, and therefore the angle the lights need to be rotated through so they don't shine upwards into approaching drivers' eyes.