In Blender 2.80, how to set a custom transform orientation programmatically?
Here's a working solution/snippet, with a description below:

        orthonormal_basis_matrix = mathutils.Matrix(
            [
                [vcross[0], vnorm[0], vdest[0]],
                [vcross[1], vnorm[1], vdest[1]],
                [vcross[2], vnorm[2], vdest[2]]
            ]
        )
        bpy.ops.transform.create_orientation(
            name='MAPlus',
            use=active_item.apl_use_custom_orientation,
            overwrite=True
        )
        orient_slot = [
            slot for slot in
            bpy.context.scene.transform_orientation_slots
            if slot.custom_orientation
               and slot.custom_orientation.name == 'MAPlus'
        ]
        if orient_slot:
            orient_slot[0].custom_orientation.matrix = orthonormal_basis_matrix
        else:
            print('Error: Could not find MAPlus transform orientation...')



Call create_transformation to add a named transformation
Use a list comprehension to search through the available bpy.context.scene.transform_orientation_slots for a slot having a custom_orientation (TransformOrientation object) with the name you provided
Test whether the list comprehension/search came up with any results, then use the discovered object and set its matrix