I think the question itself is a bit insane, but here you go:

- all the bitcoin you own has a weighted average acquisition price. By getting more bitcoin, you adjust the price by current market price.
- getting payment is income, so you account for income at the current fiat value (it is unrelated to capital gains tax, you tax income and later if you sell the btc also capital gains)
- selling btc you calculate from the weighted average. That does not change the weighted average but can create a tax liability.

Better way if you want to be compliant: never ever sell your btc. Use it as a collateral for a loan. Not selling - no capital gains (although you still have to deal with income). This way you keep your maximal long position on btc, you are shorting fiat (that's an additional upside if its purchasing power decreases faster for you - CPI is irrelevant - than the interest rate).

How to do it: book with this and other tricks for crypto life: https://hackyourself.io/product/cryptocurrencies-hack-your-way-to-a-better-life/

Course specifically for collateralized loans: https://hackyourself.io/product/how-to-harness-the-value-of-bitcoin-without-having-to-sell-it-ebook-mini-course/

This is something many of us do, not only for tax benefits, but it's just a better lifestyle, you are riding the decrease of fiat purchasing power and bitcoin as hard money (and thus great collateral) at the same time. Enjoy !