Him attacking Totland could have been an order from Kaido so that they could gather intel on the BMP
It's a possibility but I doubt it, I'm pretty sure Apoo joined the Beasts Pirates after he ran away from Totto Land. Also there are better ways to gather intel on the BMP, the only thing we know that Apoo did was enter Totto Land and was then forced to flee.
If Kaido was going to gather intel on the BMP using Apoo he would have Apoo join the BMP, I'm guessing that after Apoo ran away from Totto Land he then at some point encountered the Beasts Pirates but this time instead of running away he decided to join.
Maybe Kaido had him pretend to be an independent pirate captain, sort of like Drake with the Marines, just so that Apoo could meet up with powerful pirates and lure them into meeting Kaido.
I doubt it, many of Kaido's subordinates used to be pirate captains. I don't think Kaido is having Apoo pretend to be a pirate captain, also you are thinking way too much into this.
Apoo started his piracy in the first half of the Grand Line then entered the New World during the timeskip, and we know that according to Law in the New World you either join the Yonko's or go against them so when it comes to Apoo he ended up joining a Yonko.
Appo attacked Bigmom's territory at some point in the ts he probably did the same to Kaido as well
Little did he know that the beast pirates's are actually competent and will force him into joining
I actually think that Apoo willingly joined the Beasts Pirates instead of being forced.