We have two PS4 running on the same WIFI. For some reason (can't distinguish a pattern), there are times we can play BF1 together in the same game, and other times we can't. I don'the think it is ...
Wifi is the weakest or can be out of wired and a wireless connection, match making is random depending how you join games, but joining through a PS4 party and/or through the in game Friends list by pressing R2 on the controller, also going to your friends profile on the PS4 and joining through that can work!