Of course it would be possible.
But it would be beneficial if we can see the preview link to the page where your current solution is implemented to suggest the best way.
Usually this also can be done without Apps, by creating Line Item properties inputs and showing them via JS or even CSS only when “Custom” option is selected.