Affluent households can respond to taxation with means that are not economically viable for the rest of the population, such as sophisticated tax plans and international tax arbitrage. This article studies an economy in which an inequality-averse social planner faces agents who have access to a tax-avoidance technology with subadditive costs, and who can shape the risk profile of their income as they see fit. Subadditive avoidance costs imply that optimal taxation cannot be progressive at the top. This in turn may trigger excessive risk-taking. When the avoidance technology consists in costly migration between two countries that compete fiscally, we show that an endogenous increase in inequality due to risk-taking makes progressive taxation more fragile, which vindicates in turn risk-taking and can lead to equilibria with regressive tax rates at the top, and high migrations of wealth towards the smaller country.