How to install a toilet on raised flooring
Given that there is plywood on top of the foam to spread the load out, if you use even the usual lowest grade of XPS (not sure what type of foam you actually used or plan to use) it should not deform under load. That grade is 25PSI, so if the plywood spreads the load to 16 square inches of floor it should still hold up a 100 lb toilet and a 300 lb person - and in fact the load will be spread to much more floor area, with any normal toilet base and plywood. The one I recently installed was probably north of 200 square inches just for the toilet base area, but some are smaller.
You can also get higher grade foam - up to 100PSI is available, or you can use solid wood or masonry (won't rot, wood might eventually) right under the toilet if you'd feel better about those options. Cut a hole in the flooring system, extend the flange, pour concrete. That will stay put until someone remodels and comes at it with a hammer...