For those containers where I've added magnets, I haven't noted any problem with top-heavy cars.

I use 6mm dia., 2mm thick magnets from Amazon (no clue what the weight is per magnet) and the bottom...