I guess it depends on what medications you take.
I take about 7 different types daily. Pharmacies in Indonesia regularly give medications in their branded ziplock bags. They don’t even use the pill type containers.
I recently went to Sri Lanka, and found that about 2/3 of my medications were substantially cheaper there. So I bought a years supply of those medicines.
I had no problem bringing a couple thousand pills back. They were originally in boxes/10 pack foil strips, mostly, but I ditched the boxes for taking up less space.
I brought about 3000 pills back to the US, including stopovers in Australia and New Zealand. None of my prescriptions are pain related, or ones that many countries would care about.