Malicious use of old iPhone
About a year ago my old iPhone SE (1st gen) stopped working, battery completely died. I did not have a chance to do factory reset on it, and I just brought phone back to some electronics store, thinking that they will resell it after changing battery and doing factory reset themselves.
However, to my unpleasant surprise today I found that said iPhone SE is currently still linked to my Apple ID. It was there on https://appleid.apple.com/account/manage/section/devices . And with the NEW number which is not mine. As far as I understand how things work, that does mean that somebody is using my old phone with my apple ID but with new SIM card.
The question is simple: how bad it could get and what can I do now to secure my data, including data that was stored on the phone?