Good-o! They're a weird thing. Some seemingly last forever, some seem to fail randomly. Heat has a lot to do with it in fact I'm not entirely sure heat related failure isn't a deliberate fail-safe to save the engine in extremis but I have no written evidence to suggest that.
A spare one is something I'm thinking it might be wise for me to start carrying if I head off on a long trip out in urine drinking territory on the GRiSO Turismo. It's not like they are bulky or take up a lot of space! Both my Grisos are getting fairly long in the tooth, although Red Bike it's more years than miles. If anything is going to go wrong with them it'll probably be electrical.
Oh, and your sort of intermittent failure is pretty uncommon. Usually they work or they don't. Bucking and surging as the sensor cuts in and out is rare. Usually you just get a sudden shut down or a non start event, usually when hot. Simplest way to diagnose is to pull a plug cap and stick a plug in it and rest it on the head and hit the button. No spark? Most likely the phase sensor.