Cargo bikes are preferable for having children either directly in front or directly behind you in my opinion.
A trailer can be ok but preferably if you can stick to dedicated cycle paths and lanes out of heavy traffic.
Transporting children on any bike or trailer in traffic is definitely a risky thing to do.
Apart from that, the trouble with a cargo bike is that if you only have one bike, it’s always going to be a big lumbering cargo bike whether you’re commuting or just out for a social spin.
I use a large sized Trixie dog trailer with my pretty basic hybrid bike.
It’s bigger than almost every other cargo trailer and I can fill it up with a week’s shopping for a family of four using large reusable shopping bags filled at the checkout. Just load it all into the trailer just like into the boot of your car, zip it up and go.
And I have carried a wide variety of other heavy or bulky cargo in it too.
No bike trailer can fulfill 100% of anyone’s requirements, but although this was a little left field, it’s been a very practical and successful choice for me.
A trailer works as good as a cargo bike if you don’t need a cargo bike every day.
And it turns any bike into a real world alternative to a car.
And as soon as you take it off, you have your bike back again for whatever you want it to be.