Is it legal to have a strip of magnets running along each side wall of the track and car?

Yes, general rule #2 applies. However note rule 4.c. requires the height of the side rails to be measured from the top of the magnets, which would apply to magnets on the side wall.