The 4041 door closer, which was from the same family and series of door closers as the 4031, does not have the same footprint.
The LCN 4040XP foot print can be reviewed at the link to the installation instructions and template as seen here:
Download File
You will notice that the horizontal center to center of the screws from outside screw to outside screw is 5”
According to the LCN 4031 Template the horizontal center to center of the screws from outside screw to outside screw is 6-17/64" as seen here:
You might consider a less costly clone of the LCN 4040 seriers door closer to use as a temporary closer (will still require new mounting holes however which would be the International Closers 44CI AL Cast Iron Body for 44 Series Surface Mount Closer - Aluminum as seen here:
Click Here