While I have never tried this personally, I gather that PVC pipe filled to expanding foam is substantially stiffer than when it is empty. Master of an old square rigger told me he had done this will 100mm PVC pipe to replace a yard that broke at sea. Might just be an old sailors tale of course. Might be worth a small experiment.
I think this is mostly an 'old sailors tale'. The foam will just bend with the battens when we are talking about smaller diameter battens as required for most junk sails, and expanding foam in sufficient quantity to fill a tube is actually quite heavy, and probably quite expensive when a sail full of battens is required.
There has been a lot of discussion of battens in these forums. Aluminium T6 tube provides stiff battens for smaller diameter, T5 tube can provide stiff battens for larger diameter with thinner wall thickness and potentially lighter weight, and lower cost. Bendy timber such as cedar with a layer of unidirectional fiberglass each side can also produce reasonably stiff battens at light weight and lower cost. Carbon fiber tube can also be good for those who have access to a gold mine, or other similar funding sources!