But highres FBXs which I export from Zbrush and then import in Substance for baking don't have IDs information
You actually have to bake the ID map in Painter first (or import it from your 3d app if you baked your ID from there and just drag drop it into the ID bake channel, no need to do another id bake).
If baking in Painter:
Make sure your low res has uvs. The high doesnt need uvs but should already include your polypainted ID colors. If having subtools, use color fill. Make sure ID bake toggle is checked in Painter.
Once you've confirmed the bake is good (it's not solid black when you polypainted with multi colors, for example), add a mask to a layer. Right click the mask and add a color select filter. This is where you can color pick from your ID bake. If you get seams, increase tolerance setting.
Good luck!