Would it be possible to upgrade a smart contract to split eth payments

Hey everyone. So I launched a coin a few weeks ago, it's also upgradable.

I was curious, would it be possible to make it so that when someone makes a swap for my coin on pancakeswap, 90% received will be the coin and 10% will be ETH deposited into another wallet. So it's essentially like a presale contract where you send ETH and receive the corresponding coin however in this case, you'll receive 90% of the coins while 10% of the ETH gets send to another wallet.

Strictly curious about this in theory as it may solve some problems.