I still have a bricked Android phone from nonsense like that. If you:
1. Factory reset the phone while not logged in to the last Google account on the phone
2. Have the Google account invalidated (e.g., using an identity verification app on a temp noogler account, ...)
You'll never be able to access the phone again. The "factory reset" maintains some internal state despite a scary message on the screen promising everything is deleted and asking if that's really what you want, and it'll require the last working password.
Alright ... annoying, buggy (the fact that there are two factory resets and one doesn't reset the device is a problem; either fix or delete the broken one, or make the scary message scarier), but fine in my case.
It checks that password against Google's servers though instead of the local hash, and it doesn't even matter if you know the password; the fact that the account is inactive prevents you from accessing the phone.