I’m using pinyin input since 2019. Works like a charm. The problem is, I don’t remember exactly how I managed it. I remember installing a package from open respos to my Xperia XA2 and later, I just transfered all files containing “pinyin” to a new XA2, then to my 10 III and two months ago to my 10 V. It still works. When I search in Storeman, the screenshot of Pinyin Prime looks like my list of keyboards with several chinese languages to choose from. Maybe that’s the package I startet with. But can’t tell for sure.
祝你好运
I always had okBoard installed but I don’t think that it has any influence