A very similar thing happened to me. Somebody logged into my imessage from an iMac and a Macmini (which I dont have) to send $19.99 RayBan spam to approximately 100 US numbers. I think it is the same virus/malware that you encountered. I have an iphone with ios 9.3.5 and an iPad with 9.3.4.
I immediately changed password and security questions, plus I disabled imessage and didnt activate it again.
There was no trace of these iMac and Macmini on the active device list. Either they were immediately deleted, or they are just "ghost" devices. The problem seems solved for the moment, but I do not dare to enable imessage again.
The only unusual thing that I did the same day of the hack, was buying tickets for a liveshow, with safari from the iphone, using the same email and phone number and credit card of my itunes account (of course not the same password). Could this information be enough to hack into imessage?
Other than that, I receive several gif images everyday in telegram.
I am now thinking to reset the phone, without restoring the backup.