I am quite elated to have a service like yours. Suppose a simple phone gets locked and I have forgotten the password. In this case, is flashing the only way to unlock my device ? Also, can I flash my phone which can connect with USB cables ?
Well, it depends, on the recents iphone it's quite difficult but on android phones, then yes. A hard reset would remove passcodes. You wont need to flash the whole device. Those who are rooted, then you can install a custom recovery and via the custom recovery you can choose what you need to wipe too.
Also, can I flash my phone which can connect with USB cables ?
If you want to flash your stock rom , then you have to do it via USB and Odin pc software. If you want to flash a custom rom, then you have to flash it via custom recovery from the device itself.