The standard advice of three hours before an international flight exists because it covers the worst realistic case: check-in queues, bag drop cutoffs, security, immigration exit checks and a long walk to the gate.
Online check-in, opening typically one or two days before departure, is worth doing the moment it opens: you lock in a seat, skip or shorten the counter queue, and with a mobile boarding pass and no checked bag you walk straight to security. Note a few carriers and airports still require a document check at a counter even after online check-in, particularly where visas must be verified.
Stack the odds further by checking the airport's published security wait times where available, pre-booking any fast-track option if connections are tight, and remembering that immigration exit queues, not security, are the slow step in many countries. Arriving early costs you a coffee; arriving late costs the ticket.