Periodic and Event-Triggering for Joint Capacity Maximization and Safe Intersection Crossing