Ants on a Natural Log
PHP>=7.1, 150 Bytes

for([,$w,$n]=$argv;$i&lt;ceil($n/$w)*5+1;)echo str_pad("| ".str_repeat(["","\O/ ","-O- ","/o\ "," ^  "][$i%5],$n&lt;$w*ceil($i++/5)?$n%$w:$w),$w*4+2)."|\n";


Online Version