No, it's not linked. Immigration needs to see a print out (some people have said they presented their phones) but presenting a passport only won't work. Immigration and MOFA are two separate entities. Therefore, only extensions of stay issued by Immigration will be in their computer system. Visas have to be scanned by Immigration at the Port of entry each time you re-enter. This applies to both visa stickers and e-visas.
Well, Chiang Mai hardly gets any international flights, that's why. BTW what airline did you fly from Hanoi? Didn't know there were direct flights from there to Chiang Mai, must have been a low cost carrier such as Vietjet?
Once you've made it to Cambodia (which for nationals of countries such as yours and Pakistan is a little more involved than for the rest of us) becoming a "resident" is super easy. Firstly, make sure you arrive on an E category visa. Then, extend your stay using an agent for 6 or 12 months. Done. Its as easy as that.
How was the process getting a Cambodian visa like for you? I know there are additional documentary requirements for nationals of certain countries, including Pakistan.
It depends on your visa type, not how long you're planning on staying. If your embassy still issues a certificate of residency (many have stopped) this is an easier and better method than using immigration. Agents can also assist.
Non-O multiple entry is still available, but perhaps not for much longer. If you go to Savannakhet no later than December 20, they'll issue one. After that, they will move to the e-visa system, where, for some inexplicable reason, they've decided not to offer the multiple entry version anymore.