You can safely throw out Ping from the board.
Lag compensating can work relying on just number of ticks for which commands were received (including NoCommand commands) and confirmed. Since the game is p2p (via server or not it does not matter), each client has number of packets from other clients queued for execution and confirmations of packets he sent.
Now in a lag-less situation each client has roughly the same number of commands/confirmations queued. If there are too many command queued ahead, client can adjust ticks duration to catch up with the plan and reduce the number planned ticks (or plan less commands ahead).
If there's a lag environment, even if one client is lagging, all will, since lag affects both commands received and confirmed. In such situation, clients will need to pause and wait for commands/confirmations to arrive, to fill up the queue. Once the queue is filled with at least one command/confirmation client can make another step. While at that, clients can send several NoCommand commands, to increase the queue length (which will compensate lag better, but make the game less responsive).
All of that can be managed through a server, in centralized manner, or individually. The system is self-balancing and that's the beauty of it.