What you are refering to is the well known phenomenon of traffic waves or phantom jams. The UK has all but eliminated them with variable speed limits without the need to make every leave half a mile gap between each car.
https://nationalhighways.co.uk/road-safety/variable-speed-li...
I welcome our future robot car overlords where all of these problems should in theory be greatly reduced or eliminated entirely.
I agree, a full network of self driving cars which can all move together in a chain will eliminate this problem. I just hope I live long enough to see it.
However purposely making the cars behind you break more and causing more compression further back just so that you can avoid the compression in front of you is madness.