Samsung ("S" series and "Note" series) and iPhone have good resell value. Obviously their latest model, not 5 years old models. Mobile phones age and devalue in months or even weeks.
Having said that, if you want to keep a phone for next 3 to 5 years then buy whatever you think fits your bill. Any brand or any phone you like. But forget about their resell value. Even though, I am an Android fan-boy, I admit that iPhone has a great resell value. So does, Samsung's S series and Note series latest models. Buy and sell within 3 to 6 (maximum) months to get good resell value.
Just to remember, if you ever see the inner-working of Pakistan's mobile shop business, you'll know that Jews are better than us. Their unions pass "rules" and every shop in mobile market obey those "rules" and one of the most important rule is "15%". If you buy a mobile phone and want to resell it back to shop even after one day, they'll deduct 15% from the sale price. Some shops even deduct more, even up to 25%. Some shopkeeper, on his personal favor, may give you full refund but it's just because of his personal favor. Those "rules" are written and usually that paper is in plain sight, mostly ignored by normal buyers. Mobile shop business is as corrupt as gold-jewelry business (similar percentages), as corrupt as whole Pakistan. Few white sheep and a whole bunch of black sheep herd.
Thanks for reading my rant. Now, just don't buy Nokia. Buy an android phone with at least Android 6 (even 5 is okayish). With 2~3 GB RAM and at least 16~32 GB internal storage. Better if you can expand it with 64 GB card. Screen size depends what you want. Everything else will come with it.