In regular Android ...
Ubuntu Touch is not Android at all, so it seems strange to compare it with 'regular' Android. But I do understand your meaning.
However, since this is a PinePhone, ADB is unavailable and SSH is not setup / started by default at the moment. So I am afraid the only option left to you is, unfortunately, a reinstall.
Thanks for the reply. Yes, I just compared the idea about factory reset as in Android devices, didn't mean it's should be the same. Just trying to learn UBPorts and Linux phones more, so there should be a solution to reset a password or system. There is a telnet connection available to Pinephone: "telnet 172.16.42.1" so is there a way to reset a password via telnet? Also, UBPorts recovery could potentially help to factory reset device without reinstalling the whole system?