I remembered I need a knock sensor for the 4E, and whilst browsing the net found this:
Starlet GT Turbo and Glanza V Replacement Knock Sensor. The knock sensor is prone to becoming faulty due to age, flagging up error code 52, causing the ECU to retard ignition timing and also increase injector duty, resulting in a poor performing, and a less responsive drive. ECU Error Code 52. OEM Replacement knock sensor to save the risk of used sensors also being faulty. - http://www.ukstarletowners.com/topic/65442-knock-sensoryet-another-ʞ©$ɟin-issue/
I wonder if this was the shuttering the engine was doing on boost.