Unless your ex works for the NSA or similar organization, it's very unlikely that he has been able to hack into seven different phones. Despite the media fluff giving the impression that Android phones are a security mess, here in the real world it's just not that easy to take over someone's phone remotely. The problem you need to address is regaining control and locking down your online accounts. Stop assuming it's your phones that are the problem, you need to instead focus on your social media presence. Since he apparently has your passwords for one or more of your online accounts, it doesn't matter how many phones you go through, he still has access to your online accounts -- if you were to get another new phone, as soon as you it up, it's not the phone that he's 'hacking' into but whichever accounts he has access with that's the problem.
-- This is going to be a major hassle but you do need to get control of you online accounts again. Turn off your current phone for now, and on a computer log into your various online accounts and
change your passwords. For any online services you have set up that links to other online services (i.e. Facebook auto-logins), give some very serious thought on disabling them. Pay special attention to your Google account. Go here:
https://accounts.google.com
and log into your account. Carefully go through the 'Review your privacy settings', 'Security issues found', and 'Make Google yours'. Be sure to delete any devices that you don't own, check any logins you're not aware you've done yourself, and disable/enable just the services you want. You don't want to kill off services you need and use, but you do want to reduce your 'attack exposure'.
A more problematic issue is tied to your phone number. While you can change the password to your online account with your carrier, your ex probably still knows your phone number so that itself is another issue to make more secure.
https://techcrunch.com/2018/12/25/cybersecurity-101-guide-protect-phone-number/
-- Now turn your phone back on. Because you've changed all the passwords to your online accounts, it's going to prompt you to re-enter your passwords. Your Google account will be one of the first things you need to re-enter since that's what your phone itself authenticates with. For different apps like Facebook, Instagram, etc. you'll need to put in your new passwords as those apps get started up.
Take a lot of screen captures and document what you're doing to regain control of your online presence, the more documentation you collect might be helpful if you have to resort to any kind of legal actions against your ex. If he still has all your contact info and anything like Social Security and passport I.D. info, contacting a lawyer might be something you have to do.