I am not an expert, but in my opinion it's best not to ally with your neighbor faction, but make an alliance with neighbor's neighbor (if that's possible of course). That way, you have 2 benefits: you're not afraid of betrayal, because if it happens, the enemy will leave their back front weakened (just make sure you have good fortified defences on your borders ); the next thing is you can crush your neighbor on two fronts. I think that is what romans did actually in history. Split and rule! Good luck!