How do you avoid falling in the water on a ferry?

Easy. Don't lean over or crawl through the railing. Don't jump for the dock, wait for the gangway to be rolled out and secured, and cross with care.