This was the answer in 2018, but I am unsure if it was increased since then:
So it seems like it is possible to store larger than 4MB objects in the database, constructed entirely from within server modules, however you will not be able to send them anywhere outside of the server module without converting them to a media object or doing some kind of processing to get smaller results.
(You can probably convert them to a json bytes string, attach it to a media object, and then send that, reconstructing it on the other side of the call)