Use a chain? Thats either less secure or bigger & heavier than a u-bolt. Just look at the bar, its not going to work for the rear wheel.
The rack I describe is cheaper (less metal), more secure, and accommodates 100% of bikes. I know many Dutch-made cargo bikes won’t even work with the design shown.