Export entire database to filesystem for backup

Not necessary.

Exactly. And again, no need to script if you have a macro or keyboard shortcut app such as KeyboardMaestro, Typinator, etc. Just turn the two DEVONthink shortcuts into one macro.

Anyway, if you really want a script then use this. Use at your own risk. Tested to work here, but I don’t have your data and no support will be provided:

use AppleScript version "2.4" -- Yosemite (10.10) or later
use scripting additions

tell application id "DNtp"
	set theDB to every record of the current database
	set theDestination to "~/Downloads/DBE"
	repeat with thisItem in theDB
		set theResult to export record thisItem to theDestination
	end repeat
end tell

If the destination folder does not exist, the folder will create it. If the destination folder does exist, the script will create a duplicate folder for everything exported. A more sophisticated script could catch that behavior.