What if price were a function of buyer's income? If everyone's income were public information, would purely profit-seeking sellers benefit from charging different prices to people based on their different incomes? My intuition says yes because a buyer's demand for some good at a given price depends on that buyer's situation in life, including income. It seems to me that prices could be better optimized if customer information on an individual level were taken into consideration.

But I'm not sure about this. I lack the mathematical know-how to think about this thoroughly. It seems plausible that the optimal price would be the same for all customers due to competition causing prices to converge ...or something along those lines. The Wikipedia page on price discrimination brings up the issue of discount buyers reselling goods for a profit, but I think this could be avoided by limiting the quantity of a discounted good a customer can buy, and it's not an issue at all if the good can't be resold. That page also refrences coupons as an example of price discrimination because only people with a low enough income can benefit from spending time on clipping coupons.

So I think there are already some successful forms of mild price discrimination, but it doesn't seem all that common, possibly because there isn't a way for customers to prove his/her income. Could price discrimination based on income work at a larger scale if people could prove their incomes, and could this help reduce inequality?
This is just perfect price discrimination. Happens sometimes with niche drugs (where drug makers can know the ability of people to pay). In this scenario, consumer surplus is completely captured by suppliers.