I would agree about it 'crashing about like a wild thing' but what I always do is secure my boat in the lock, never tying it up. My method of lock operation (going down when most things that can go wrong, do) is I come into the lock on tickover and as soon as the boat bows are into the lock, step off with my centre line and strap the boat to a stop on the bollard nearest to the top gate before the boat reaches the bottom gate. The reason for this is because once going into Ryders Green top lock under power, when I came to put it into reverse to stop the boat a load of plastic wrapped around the prop and suddenly I'd got no 'brakes' so hit the bottom gates a lot harder that I would want to, doesn't happen if you strap the boat to a stop. I close the top gate and then take the same centre line to the bollard by the bottom gate and pull the boat tight up against the gate. What this means is with the boat tight up against the gate there is no prospect of it being drawn onto the gate and hitting it with any momentum. Empty lock and no dramas. Going up I once again use the centre line to pull the boat up tight to the cill using the bollard by the top gate (assuming that water isn't cascading down through the gate). Once again, with the boat pulled tight against the cill/gate there is no prospect of it hitting it with any momentum.
This isn't to say that sometime things go wrong; a couple of days ago using the above method as the boat went down in the lock I'd only got one 'bight' around the bollard and for what (to me) was some inexplicable reason the boat was being drawn towards the top and away from the bottom gate where I was valiantly trying to hold it. At this point, as I couldn't figure out what was going on, I called for all paddles to be shut, but even with that I still couldn't hold the boat and it went backwards into the top cill with some momentum (fortunately all taken by the rear button and not the rudder). Turned out that the problem was caused by one of the top paddles still being open which, as the lock emptied, created a 'swirl' within the lock dragging the boat towards the top gate. Fortunately no damage done either to the boat or the infrastructure.
All of the above relate to narrow locks, broad locks are a whole different ball park.
Should also add that this is just my way of doing things, other options are available