Paul
The NMRA weight recommendation for a 40 foot O scale boxcar is 15 ounces.
A Lionel Standard O PS-1 boxcar weighs just about 15 ounces.
MTH Premier 40' boxcars weigh 17 ounces.
Atlas Masterline 40' boxcars weigh 19-20 ounces.
If you are running modern scale boxcars they shouldn't need more weight unless you have some other unusual operating conditions. If you have older/smaller/lighter boxcars I would weight them until they are in the 15-20 ounce range.
Be aware the O-31 curves are what they have always been, toy train curves. They are very tight and backing a long train through them entitles cars to cause problems. Additionally, O22 switches were not very good 60 years ago and they haven't gotten any better with time. Modern switches like Fastrack and Ross are better functioning switches and the larger diameter modern switches are better still.
If you want to back a 20 car freight train through a switch you should be able to do it using stock modern O scale cars like those described above if you are using O-72 or larger curves, a modern track system like Fastrack, Ross, Atlas or Scaletrax and a modern locomotive with Proto 2, Proto 3 or odyssey II run at a steady slow speed. If cars, track or locomotive control are "traditional" things get harder quickly. If cars, track and locomotive control are all traditional backing trains through a switch reliably is very hard indeed and you will be doing well to back a 6-8 car train through an O-31 switch consistently without derailing.