Is there a way to know when mesh topology is edited in Blender scripting API
Yes, you can use Depsgraph and handlers (depsgraph_update_post/pre) for that. For example,

import bpy

def mesh_change_listener(scene, depsgraph):
    # check if we need to iterate through updates at all
    if not depsgraph.id_type_updated('MESH'):
        return

    for update in depsgraph.updates:
        if isinstance(update.id, bpy.types.Mesh):
            print('Mesh \"{}\" updated.'.format(update.id.name))
            do_your_stuff(update.id)


if __name__ == '__main__':
    bpy.app.handlers.depsgraph_update_post.append(mesh_change_listener)