Placing a Lightroom Classic catalog in Dropbox does nothing for the amount of memory used or any other memory issues. Dropbox syncs a local folder, so the catalog will still be a local file in that local folder. Even if you set the file to 'online only' in Dropbox, that still does not change it. As soon as you (read: Lightroom Classic) try to open the file, it is downloaded so it's a local copy again.
Using 'online only' may be the explanation of your problem however. There is a problem with Dropbox and the latest versions of MacOS, where this automatic downloading does not work for anything but the Mac Finder. That may be the reason why Lightroom says the catalog is corrupted and why repairing it fails. Lightroom Classic cannot work with an online catalog. It needs to download the file, but that does not happen because of this issue. So if the file is indeed set to 'online only', then change this to having a local copy. And if your memory theory is the only reason to place the catalog in Dropbox, then consider moving it out of Dropbox completely.
BTW: a catalog with 28,000 images is small. My own catalog is around 200,000 images and there are photographers who have a catalog with one million images or more, without having memory issues.
-- Johan W. Elzenga