One thought: can you boot into safe mode? This will involve some key combination when booting (don't know what because it will depend on what device you have, but you'll be able to find out with a web search). If the malware hasn't been able to install itself to the system (and since Android 6 that has been so rare I'm not sure I've ever heard of a case) then in safe mode it will be disabled, allowing you to identify and remove it. Now that might sound rather pathetic, but as most phone owners don't know that safe mode exists it would probably still suffice for your typical malware scammer.
(Of course if your phone is rooted then you are vulnerable to malware infecting the system, but if you know enough to root the phone I assume you also know that, and would also know how to reflash the phone or install a custom ROM. Some no-name Chinese phones have been known to be rooted out of the box though, so I thought I should mention this. If malware does get into the system rather than just being a user app you will have to reflash the phone to get rid of it.)
If you want to reset it you just need to boot into recovery mode. That will require restarting it while pressing some buttons down, which buttons depend on which model of device you have. As this is accessed via the bootloader rather than the Android operating system you won't be locked out of that (no malware running in the Android system can modify the bootloader).
I might add that another phone won't help you with this. If you want to reflash it you'll need a computer. As noted above, the firmware will be specific to the model, so you'll either have to get it from the manufacturer (or, in some cases in some countries, the carrier you bought the phone through) or find a trusted source on the web.
If for some reason you are unable to reboot (which is unlikely: it would have to have its claws in very deep to stop pressing and holding the power key for 10-20 seconds from forcing a restart) you can always just leave it to run out of power, then boot into recovery or bootloader when you restart it.