Simple solution here: don't buy locked phones anymore. My last locked phone purchase was in 2011. In the US, you don't need to buy a locked phone anymore to get service.
Two months ago I bought Samsung A03 to sit 24/7 on the charger and WiFi. I would have bought even something cheapear, but it was the cheapest one (without bothering with delivey) and it had everything need for a modern smsrtphone