It's easy to save on RAM, but RAM is cheap. With the zram module in Linux, you can create a zram block device 2x the size of RAM with mem_limit set to 50% of RAM and experience approximately no performance hit--faulting out of zram is approximately twice as heavy as a worst-case cache miss. I've had a 1GB server run 700MB into zram swap trying to run Gitlab, with 40MB of available RAM (including disk cache), and not show any visible sign of performance degradation; note that that's about 230MB of RAM acting as a compressed cache area for that 700MB, and 770MB of flat RAM available.
This works because CPU isn't pegged to 100% on average across 1 second, and decompression requires something like 23-26 instructions per byte. That means decompressing one page per second on a 1.2GHz core consumes about 0.00887% CPU at 1 cycle per instruction, or 0.0266% at an average 3 cycles per instruction. RAM prefetching is actually huge--a cache miss can cost 48 cycles for 64 bytes (on x86-64) or 0.000256% for a 4096-byte page, at a minimum, with 8-cycle CAS across a CPU, or a whopping 1,200 cycles or 0.0064% for 4096 bytes, although that's never going to happen (it's physically impossible: sequential reads don't need the expensive row precharge before RAS after the first read).
Basically, if your code uses memory infrequently, it has no reason to swap; and if it uses it frequently, then the cost of swapping can be absorbed by prefetch algorithms similar to the ones used by the CPU itself to avoid the above cache miss costs. Standard LRU swap algorithms will prevent swapping out of frequently-used memory; and the delay waiting for a swap-in consumes the bits of unused CPU time in a 99.7%-pegged processor.
The performance hit explodes exponentially at a certain point. If you have 1GB RAM and use 900MB as a compressed swap such that you have 2.8GB available, you're going to have a bad time. If you have 1GB and use 500MB for swap such that you have 2GB available, you'll be fine even under high load.
The problem is the whole phone is made of a SOC which isn't that much cheaper on 1GB versus 2GB; expensive NAND storage; radio chipsets; a battery; an expensive display; and so forth. The SOC isn't even the biggest part, with a cost of like $35 or sometimes in the $20 range for something current-generation for a $400 phone, up to $70-ish for state-of-the-art SOCs. Slap a $100 screen, $80 of TLC NAND, and $40 of boards and components and case around a $30 chip and you have a $250 phone.