To address your first question, this is a bug, and thanks for reporting it.
I have created a suggested fix in dolfinx, which hopefully will be merged soon.
For question 2: I am not aware of any built-in functionality for this, but I might be mistaken there.
Also, you need to be more specific about you want this map to do, should it work for only CG 1 function spaces or arbitrary function spaces?
You also need to be very specific if this map should work in parallel or not, and if you want to redistribute the refined mesh or not.
select_colliding_cells is good enough. The middle point of each sub_cell collides with a cell of the original mesh. Perhaps this is not efficient but it works.
from dolfinx.cpp.geometry import select_colliding_cells
NE=cells.shape[0] # cell count of mesh
cells3 = mesh3.geometry.dofmap.array().reshape((-1, mesh.topology.dim + 1))
xy3=mesh3.geometry.x
mx3=np.sum(xy3[cells3,:], axis=1)/3 #middle points of refined mesh
inx=np.squeeze(np.array([select_colliding_cells(mesh, range(NE), mx3[mi,:],1)
for mi in range(mx3.shape[0])]))
refine_map =np.array([np.where(inx==i)[0] for i in range(NE)])
print(refine_map)