I think TCP keepalives are conceptually the best though. As your problem occurs at the transport level, not the application layer.
This way you solve it where the issue occurs, and with the added benefit that it works for all TCP connections, not just SSH.
However I haven't had this issue. My isp is pretty ok in this regard and I supply my own router. So I don't know if there's issues with this in real life.
Some NAT implementations ignore TCP keepalives. Alcatel branded ADSL modem/router I had used in 2005-ish certainly did and IIRC some more recent Zyxel ones do the same.
This way you solve it where the issue occurs, and with the added benefit that it works for all TCP connections, not just SSH.
However I haven't had this issue. My isp is pretty ok in this regard and I supply my own router. So I don't know if there's issues with this in real life.