How can I add static route in order to access machine that had wrong static IP configured? From time to time I end-up having to connect to a machine that was not configured to use DHCP. 

Assuming that I know the static IP address of that machine and that this machine is already physically connected on my network, how do I add a custom route on MacOS in order to be able to ssh to that machine and reconfigure it?

I assume it is something like sudo route add ...
I do this all the time. There are 2 options:-

ssh user@&lt;IP&gt; for a known IP address

or if the machine has a hostname, the Mac should be able to discover it with
ssh user@hostname.local

Similar settings can be used from most GUI ssh clients.