Would a bot get locked out if it responds to 20 PING messages in a short period of time?

You don’t get ping requests per channel or account, but per connection. You can circumvent the 20msg/30s limit by spawning new connections.

So the pongs should not affect this limit.