2 years ago I have tried to make an infinite lava resource (similar to the infinite water resource) but it didn't work. Now I have done something similar, via add-ons!
First grab your bucket and one basalt rock (basalt can be mined indefinitely with a basalt generator)
(This image is not mine)
Now craft them into a bucket with rocks (shapeless recipe)
Now you can smelt it into a lava bucket in a Furnace or a Blast Furnace!
Don't worry, your bucket will not be consumed.
Video for explain how it don't consume your bucket:
(Video is outdated cuz im too lazy to update it)
Thats all in this simple Add-On, it is compatible with other Add-Ons since it doesn't add weapons or tools that modify player behaivor.
Now the old version is called speedrunner version (normal and speedrunner have the same uuid for now, so you have to choose)
Select version for changelog:
Changed recipe to include basalt now, with cobblestone it was too OP, but i keeped the old version as speedrunner version, now you have to go to the Nether before getting Infinite lava 😉