WHIP is based on WebRTC, indeed it is possible to use mediasoup for that with some work, see Is there a way to use mediasoup server side implementation only without using mediasoup-client ?
As to ports, 4 audio/video ports doesn’t seem right, you just need 1 for each sender or receiver peer connection and you can send as many audio/video tracks over such WebRTC connection as you want.
Also you can add TURN server in front of mediasoup, then you need just 1 port for all clients on the server.