Yes, as a Chinese passport holder (RoC), this is allowed.
But you won't be in transit in TPE, but rather enter the RoC "normally", ie having to adhere to all the covid protocols that will (possibly) still be active by that time there in the RoC. You'll (most probably - unless things change a lot till then) have an entirely different ticket to actually enter the PRC from the RoC, ie a direct flight from TPE to a PRC airport.
So in your situation, all that really counts is the flight from the RoC to the PRC.
For the return flight, I'd wait and see. If the RoC has stopped quarantine rules by then, probably a quick flight would make things more comfortable, so I'd book a ticket PRC to RoC, again (or even book RoC->PRC->RoC as a return) over a long haul flight Ex-PVG.
But things are most probably quite a bit different in few months time, so I'd wait and see much closer to your travel date.
6 months ago, China's strategy of 0 covid looked still very solid (despite having no exit out of it), now, it's looking more like doom than anything else.