Welcome to our forum and thanks for contacting us with your question!
Highcharts Stock has a functionality called ordinal on the xAxis. It cuts out the unused space as you intented, I prepared a demo with xAxis.ordinal: true so that you can see how it cuts out the weekend with no data.
Demo: https://jsfiddle.net/BlackLabel/fxdc6jn3/
API: https://api.highcharts.com/highstock/xAxis.ordinal
Feel free to ask any further questions!
Best regards
Jakub