If you get a soundbar with an actual HDMI input (not an HDMI-ARC input) and HDMI output you should be able to use an HDMI adapter to connect the Macbook.
To actually get 5.1 you would need surround speakers and a subwoofer. To get Atmos the soundbar would also have to have upward firing speakers.
The Macbook would have to support these audio codecs as well so I would check that first,
Yes the headphone jack is stereo only. If the soundbars you want are out of your budget then Atmos is out, that is only in higher end equipment. Sorting at BestBuy by Atmos support shows even open box soundbars with Dobly Atmos support are near $400.