It is possible by modifying the CPU bot code. There's one code there that does something with inputs that only runs once though, so you might need to find another way to toggle CPU on and off in game.
For making you the CPU when the camera isnt targetting you, you need to compare if the camera target ID (in 0x80001620) is 0 (you), if it is, skip code, otherwise, check if "CPU" ID is 0 (you) and if it isnt, skip code too, otherwise set CPU
I say skip code but you likely have to do something else to disable CPU
You will also need to remove one of the 8058XXXX and maybe modify 8072XXXX
For making you the CPU when the camera isnt targetting you, you need to compare if the camera target ID (in 0x80001620) is 0 (you), if it is, skip code, otherwise, check if "CPU" ID is 0 (you) and if it isnt, skip code too, otherwise set CPU
I say skip code but you likely have to do something else to disable CPU
You will also need to remove one of the 8058XXXX and maybe modify 8072XXXX
mtctr r0 ~ bctrl / BLX R0