I had some BTC in a software wallet this year and so when the cash, and then gold, forks took place I was able to just get my private keys from the wallet and thereby access my cash and gold bitcoins.
However, if my BTC were instead in a hardware wallet at the time of the fork, would I have had no way of ever claiming the new forked coins? Because, as I understand it, there is no way to retrieve one's private keys from such devices?
Depends on what hardware wallets you were using. Telling us that info would be helpful. If said wallet doesn't allow you to view your private keys then you will probably have to wait for an update from the device manufacturer but I think Ledger has already done this for bitcoin gold at least if you're using one of their physical wallets.