It can control Sonos, or something else as a player through Home Assistant (or other home control system of your liking). I have set it up so Sonos control goes through HA, but will add an option to control Sonos without HA also. This will both have one less requirement, and on the margin a little bit lower latency.
It does work perfectly with a Beo4 yes, and also with bluetooth remote if you prefer. With regards to Beoport; if your question is if you have all functionality without a BeoMaster 5, as long as you have a Beoport and a power supply for the BeoSound 5, then it is correct yes. You would then have the BeoSound5(c) working without IR, and you would have IR to the Beoport.