Does riding with suspension locked do any harm long term
On Trek 4300 you have RST Gila fork which is cheap and simple. You can't really lock it completely, just pre-load the spring to maximum. I'd say you should not worry about it - the internals are very simple and can't really be damaged easily: this is no oil/air fork. It has a steel spring and some rubbers to work as dumper.

And most likely the juddering you notice is not from the fork, but rather from the breaks themselves.