You need to know what OpenSSH needs to wait for tho (probably io-net). But if you remove the sleep 5 command the OpenSSH failure will hopefully tell you what it needs. Then you can wait for it with something like:
if you are using dhcp then it’s possible ( never used open ssh either) that you must wait for the ip address to be assigned. I do not know of an easy way to wait for this.
You could write a script that does
sleep 5
sshd
And start that script from rc.local with a &. That way rc.local would not block for 5 seconds.