Isn’t it well known in the Android modding community how to replace and make custom APEXs? E.g. XDA has some good documentation. That seems like the right way to solve this problem.
[1] https://www.xda-developers.com/android-q-apex-biggest-thing-... [2] https://www.xda-developers.com/android-10-custom-boot-animat...