Tbh, I have no idea how the power struggle went between them.
Lily worked with IMU so it kind of implies not all Ds were with Joyboy.
It could be
1) Davy vs Joyboy - Joyboy liberated the AK from evil rule but seeds of oppression against other nations were planter.
iMU and co rose to fight AK and defeated Joyboy
Perhaps, even Joyboy was branded as evil king.
Or
2) 20 nations fought against Davy Jones. Joyboy sided with AK to fight the 20 nations. Both Davy and Joyboy due to differences lost to IMU
		
		
	 
 Lily probably believed in the cause but then saw the winners turn into even bigger assholes then the AK so she left them.
Yeah Im baking on 2 because Vegapunk said JB sided with the AK. I think its a matter of fate, Blackbeard is big on it.
Fated battle between Nika and the EG is still ongoing. The Gorosei mention that the war is still ongoing. And its true. Nika is back, BB is alive and well.
They know a next world war is coming and are preparing.