hello. kinda sounds like a problem with the thermocouple ready to go south, maybe. it could also be a looseness where the thermocouple threads into the control box. sometimes, for whatever reason, they loosen a bit. gently try tightening at this area. even a little bit loose will affect the on and off of the pilot. if you take the whole assembly out to clean the thermocouple why not just change it? it's 17 and might be on its way out anyway.
and lastly, it could be time to start shopping for another heater, yours sounds like it may be ready to give you a surprise
one day. and we all know when that will happen!
at the most inopportune hour of the day! hth